How to validate multidimensional array in Zend?

nyotorres

New Member
I am wondering what is the best way to validate multidimensional array using \[code\]Zend_Validate\[/code\] with \[code\]Zend_FilterInput\[/code\]. Here is my current code:\[code\]$filters = array( 'symbol' => array('StripTags', 'StringTrim'), 'mode' => array('StripTags', 'StringTrim'),);$validators = array( 'symbol' => array('NotEmpty'), 'mode' => array('NotEmpty'),);$input = new Zend_Filter_Input($filters, $validators, $_POST);\[/code\]I would like to append here an array, for example \[code\]name[]\[/code\] array (posting an array with two/three names).Here is a sample \[code\]$_POST\[/code\] array:\[code\]array( 'symbol' => 'SD34G', 'mode' => 'back', 'name' => array( 0 => 'Name A', 1 => 'Name B', 2 => 'Name C' ))\[/code\]
 
Back
Top