While learning about Zend_Form I used examples from quick start guide. However, when I tested my code I've got an error "Cannot unset string offsets" in Zend_Form_Element. I found how to fix the issue (http://www.nabble.com/Problems-submitting-a-Zend_Form-td20109449.html). Yet, in the documentation examples Regex validator occurs with and without a wrapper array. For example:
// Pass a pattern $username->addValidator('regex', false, array('/^[a-z]/i')); further down: // or, more compactly: $username->addValidators(array('alnum', array('regex', false, '/^[a-z]/i') )) Doc. page: http://framework.zend.com/manual/en/zend.form.quickstart.html#zend.form.quickstart.elements Thanks.