zendframework/zf2 — pull request #4116 by davidwindell (2013-03-26 16:16:41+00:00)
Title: [WIP] [InputFilter] Allow specification of error message via Factory

One might want to stop the 'Email' validator (for example) from returning all of the multiple errors about hostname, parts, etc. This is already supported by `\Zend\InputFilter\Input` via the `setErrorMessage()` method.

This PR simply adds the ability to specify this via the factory.

```
$this->add(array(
'name' => 'email',
'required' => false,
'error_message' => 'This is not a valid email address',
'validators' => array(
array(
'name' => 'EmailAddress',
)
)
));
```