i use the following fieldset for grouping information:
<input type='text' name='personal[firstname]'>
<input type='text' name='personal[lastname]'>
Now i want to use an InputFilter to validate the form, but nothing happens:
class CustomerFilter extends InputFilter
/**
* Build filter
*/
public function init()
{
$this->add(array(
'name' => 'personal[firstname]',
'required' => true,
'filters' => array(
array('name' => 'StringTrim'),
array('name' => 'StripTags'),
),
'validators' => array(
array(
'name' => 'StringLength',
'options' => array(
'min' => 3,
'max' => 15,
'message' => 'Minimum: 3, Maximum 15 Chars allowed'
),
),
),
));
}
What do i have to change?
EDIT: Finally, i managed it with help of this link:
http://framework.zend.com/manual/2.2/en/modules/zend.form.collections.html