Hi all,

I have a minor problem writing my own validator: The validator can  
handle two arguments but one is optional. This does not seem (easily)  
possible with the current implementation: The Validator first checks  
whether all arguments are set and bails out if not, never calling the  
actual validation code. There is no way to pass the information 'this  
parameter is optional' to the validator.

I could (and will now) overwrite AgaviValidator::checkAllArgumentsSet 
() but that seems like an ugly solution - any chance that there might  
be an easier solution in future agavi versions?

Something along the way of

<validator class="FooValidator"...>
  <arguments>
    <argument name="required_argument">..</argument>
   <argument name="optional_argument" required="false">...</argument>
</arguments>
...

regards

felix

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

Reply via email to