Hi

I was wondering if anyone might be able to help.  I am working on an
application that requires a Zend_Form to have validation checks that are
'errors' which mean the form cannot be posted and some validation checks
that might raise a 'warning' to the user.  The warnings can then be accepted
and the form will then post successfully.

I have the form definition defined in a class which extends Zend_Form and it
would be quite nice to be able to have both the error and warning validators
defined in this class, all in one place.

Is there any way of marking up a validator as a certain type, so that I
could then put something in the controller or the isValid() method to just
remove validators of a certain type (i.e. remove the warning ones if I find
the user has accepted all warnings).

I know I could add/remoe the warning validators in the controller by
specifically targeting the elements and validators I want to remove, but I
didn't really want the controller to have to know about the specific
elements.

Any ideas, much appreciated.

Thanks

Colin
-- 
View this message in context: 
http://www.nabble.com/Define-a-validator-as-a-certain-type%2C-e.g.-a-warning--tp23312979p23312979.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to