I tried to validate my input and translate the validation messages to Portuguese, but the AlNum filter is ignoring my message!
The output I get, using an empty form is:
Code:
'' is an empty string!
A password é de preenchimento obrigatório!
O endereço de correio electrónico indicado não é válido!
The other validations are getting the right message from 'messages' but the AlNum filter isn't working...
PHP Code:
[...]
$validators = array(
'login' => array(
'AlNum',
'presence' => 'required',
'messages' => 'O login apenas pode conter caracteres alfanuméricos [a..z][A..Z][0..9]!'
),
'password' => array(
'presence' => 'required',
'messages' => 'A password é de preenchimento obrigatório!'
),
'email' => array(
'EmailAddress',
'presence' => 'required',
'messages' => 'O endereço de correio electrónico indicado não é válido!'
),
[...]
Bug? Or am I doing something wrong?
NOTE: If i change AlNum to EmailAddress or remove that filter I get the right text.