I don't get Zend_Validate_Regex working
- by poru
Zend_Validate_Alpha doesn't fit 100% to that what I want and I don't get Zend_Validate_Regex working.
I want that the validator just allows a-z/A-Z, 0-9, _ and -.
I tried to add the following to one of my inputs:
addValidator('Regex', true, array('pattern' => '/^[a-zA-Z0-9_-]/'))
but for example abc§$%& is a valid input says the Zend Validator. What am I doing wrong?