Validators in general have request to all request data and any value  
that has been exported by a previous validator. They might want to  
inspect other data to determine whether the argument is in a valid  
range or compare to another value from the request data etc. You can  
pass any parameter name to the validators getData() method.

However, there's some things that are different about arguments:

  * Arguments passed as parameters will not be taken into account when  
determining whether all required data has been passed.
  * Failures and Success will only be recorded for arguments. That is,  
a field that has been passed as parameter will not be flagged by the  
fpf. It will also not be marked as "succeeded" by the  
validationmanager and thus will not be available in the validated  
request data unless you either mark them manually or export the value  
explicitly.

There might be other side effects, but that's all I can think of right  
now.

felix

On Nov 4, 2009, at 11:21 PM, Michal Charemza wrote:

>
> On 4 Nov 2009, at 21:35, Felix Gilcher wrote:
>> currently this is not possible out of the box. You can however pass
>> additional argument names as parameters,
>
> Ah: I didn't know that validators had access to data that wasn't
> specified in their argument list. Just to keep it simple, I think
> actually I will do something like this rather than your other
> suggestions.
>
> As a sidebar, why do validators have access to all submitted data?
> Although I'm not sure why, I did expect each to only have access to a
> subset of data: the ones specified in the argument list.
>
> Thanks!
>
> Michal.
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
>


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

Reply via email to