SubmittedForm validating arrays

  • Hi drewm


    It seems PerchAPI_SubmittedForm::validate() does not handle arrays at the moment. So an input like this always throw an error (given the required attribute is set):


    HTML
    1. <perch:input id="email[primary]" type="text" label="First Name" required>


    I can workaround this by using an alternative syntax (e.g. email__primary) and writing a little more PHP if I really wanted to have it as an array. However, I can't avoid using arrays for handling multiple file uploads:


    HTML
    1. <perch:input type="file" id="uploads[]" multiple accept="pdf">


    It would be very helpful if PerchAPI_SubmittedForm can validate values submitted as arrays.