zendframework/zf2 — pull request #4117 by davidwindell (2013-03-26 16:25:43+00:00)
Title: [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 as `error_message`.

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