Last active
December 10, 2015 01:34
-
-
Save localheinz/4359801 to your computer and use it in GitHub Desktop.
Translation of validation error messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Please be aware that __($messageId) is just as function that returns $messageId - it is used for gettext to pick up | |
* message ids. | |
*/ | |
$this->inputFilter | |
->add(array( | |
'name' => 'firstname', | |
'validators' => array( | |
array( | |
'name' => 'NotEmpty', | |
'options' => array( | |
'messages' => array( | |
Validator\NotEmpty::IS_EMPTY => __('FORM_USER_FIRSTNAME_EMPTY_ERROR'), | |
Validator\NotEmpty::INVALID => __('FORM_USER_FIRSTNAME_INVALID_ERROR'), | |
), | |
), | |
), | |
), | |
)) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment