I have an input filter...
$this->inputFilter->add($factory->createInput([
'name' => 'reason',
'required' => true,
'filters' => [
[
'name' => 'StripTags'
]
],
'validators' => [
[
'name' => 'StringLength',
'options' => [
'min' => 10,
'max' => 150
]
]
]
]));
When the length is 0, the 'required' error kicks in (appears to use NotEmpty validator.) This gives a very generic message "Value is required and can't be empty."
Since I am showing all errors in list above the form and not next to their input, this is not specific enough.
I am assuming there is a 'messages' key like in the validators array, but I cannot find any documentation on it.
How can I set the message for an empty input?