You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to simply add a specific error message to appear if the validation function created inside the class return false. How can I do this? The instructions on the README.md do not seem to cover this issue.
Thanks!
The text was updated successfully, but these errors were encountered:
// Set custom error messages for rules.GUMP::set_error_message('required', '{field} is required.');
GUMP::set_error_messages([
'required' => '{field} is required.',
'valid_email' => '{field} must be a valid email.'
]);
I'm not understanding why the error messages are static, we should be able to set custom everything on a per-instance basis when needed. With extending the class and adding filter_* and validate_* methods, you can set custom filters/validators on a per instance basis, but then why do the error messages associated with those validators have to be global? I would like to be able to make a function that returns me a gump instance specific for my needs, without affecting all other gump instances used in the same project. I don't know if some reflection tricks can somehow accomplish this but its not something I've ever done. @filisko
I want to simply add a specific error message to appear if the validation function created inside the class return false. How can I do this? The instructions on the README.md do not seem to cover this issue.
Thanks!
The text was updated successfully, but these errors were encountered: