Okay, I can reproduce the issue and have determined what the problem is. A fix will take some time though; it's going to be quite difficult to find a proper solution for this one. Will keep you posted.

- David


On 23.07.2009, at 18:19, Michal Charemza wrote:


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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to