I have setup a form along with filters and validators which seem to work correctly.
However, I can not seem to get custom error messages to work. So far I have tried.
$inputFilter->add(array(
'name' => 'message',
'required' => TRUE,
'filters' => array(
array('name' => 'StripTags'),
array('name' => 'StringTrim'),
),
'validators' => array(
array(
'name' => 'NotEmpty',
'messages' => array(
NotEmpty::IS_EMPTY => "You must specify your message",
),
),
),
));
All I get is the standard validation error message 'Value is required and can't be empty'
Please can someone point me in the right direction, many thanks.