forms - Zend framework multiple Validators in an array -


i want create form in zend framework. using code below field:

$this->addelement('text', 'username', array(     'label'      => 'username:',     'required'   => true,     'filters'    => array('stringtrim'),     'validators' => array(         'alnum'     ) )); 

this works. want add new validator. in case strinlength

$element->addvalidator('stringlength', false, array(6, 20)); 

how can add validator in array have? tnx in advanced

doesn't work:

<?php $this->addelement('text', 'username', array(     'label'      => 'username:',     'required'   => true,     'filters'    => array('stringtrim'),     'validators' => array(         'alnum',         array('stringlength', false, array(6,20))     ) )); 

similar the example given in manual


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -