On 23 Jul 2009, at 10:17, David Zülke wrote: >> >> <validators method="write"> >> <validator class="arraylength" source="files"> >> <arguments> >> <argument>Mfile</argument> >> </arguments> >> <ae:parameters> >> <ae:parameter name="min">1</ae:parameter> >> </ae:parameters> >> <errors> >> <error for="min">At least one file is required</error> >> <error>Array Length Error</error> >> </errors> >> </validator> >> </validators> >> >> And the file fields in the template are all identical: >> >> <input type="file" name="Mfile[]" /> > > And what is the issue? That you cannot access the individual files? > That would be expected. Or are you getting "Array Length Error"? > Does your <form> have enctype="multipart/form-data"?
Yes sorry I was unclear: using the above validation XML always results in "Array Length Error". The form does indeed have that enctype: for one thing the files are accessible when I include another another validator that validates them. It's just that I would like to make sure there is at least one file. Michal. _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
