I need to use validator chains in the getInputFilterSpecification method of the fieldset to use the breakChainOnFailure parameter and get only one error message.
I know make validator chains using InputFilter classes how explain the zend documentation, e.g.
$input = new Input('foo');
$input->getFilterChain()
->attachByName('stringtrim', true) //here there is a breakChainOnFailure
->attachByName('alpha');
But I want make the same using the factory format. Where can I put the breakChainOnFailure parameter in this sample:
$factory = new Factory();
$inputFilter = $factory->createInputFilter(array(
'password' => array(
'name' => 'password',
'required' => true,
'validators' => array(
array(
'name' => 'not_empty',
),
array(
'name' => 'string_length',
),
),
),
));