I have a few custom form validation rules I wish to apply. Things like ensuring the password has one capital letter, at least one number, and a symbol.
Where would be best to implement these custom validation rules?
I am currently validating them in a controller, but obviously that won’t scale very well when I expand. So I was going to implement them as view helpers.
I don’t have too much experience with zend_form. Is there a way to set a custom validation handler when constructing the form object?
Thanks!
Yes when constructing the form you can add a set of validators to any form field you wish. I like to make individual Fomr classes that extend Zend_Form… and here i set the default configuration for that form. If something need to be different in a specific usage then i override as necessary in the controller.
Check out the manual and update your question or start a new one ith specific issues you run in to.