Hi,

I'm trying to get array length validation for a number of files, each  
with the name of "file[]". I have tried the following, but it always  
results in 'Error' message no matter if there are files.

<validator class="arraylength">
        <arguments>
                <argument>file</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>Error</error>
        </errors>
</validator>

*However* if the above XML works fine for text fields (in my example  
if I replace "file" by "fileDescription" where there are a number of  
text inputs each with name fileDescription[]).

I temporarily injected a "die" statement in  
AgaviArraylengthValidator::validate, and it appears that the validator  
is not even called. Any suggestions?

(I am actually extending arraylength to remove "null" values from the  
arrays, but I'm unsure if that's important).

Michal.

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

Reply via email to