How to localize "input not valid"?
How to localize "input not valid"?
pisisler
Posts: 125Questions: 24Answers: 1
Searched for it but couldn't find. Is it hard coded somewhere? Because there is no appropriate entry for it in language file. I know there is message()
method in validation, but implementing it into every single field with the same message looks not nice.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I think you're referring to the field validation in the server-side scripts - see here. That would need a change to the server-side scripts.
Colin
Yes, I was referring to that. See this part in the documentation you referred:
I simply want to localize that "default" (which is to be "Input not valid") rather than calling
message()
for multiple times for different fields with exactly the same content.That message is in two places in the Editor package, see here:
lib/Editor/Validate.php: 'message' => 'Input not valid',
lib/Editor/ValidateOptions.php: private $_message = 'Input not valid';
If you edit those two files, that will change the default,
Colin
Then it is hardcoded yes. If I need to setup a multi language environment, I need to call
message()
rather than editing core DataTables files. Thank you @collin