We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it could be a good idea to add a section in README explaining how to add a custom I18n error message when URL validation failed
The text was updated successfully, but these errors were encountered:
I have the same problem and could not figure it out. Any help is very appreciated.
Sorry, something went wrong.
I know this is very late, but I did this and it worked: url: { message: I18n.t('path.to.custom.error.message') }
url: { message: I18n.t('path.to.custom.error.message') }
It would be better if the line
record.errors[attribute] << (options[:message] || "is an invalid URL")
were changed to
record.errors.add attribute, :invalid_url, options
as the error message could then be customised and localised in the normal Rails way.
No branches or pull requests
I think it could be a good idea to add a section in README explaining how to add a custom I18n error message when URL validation failed
The text was updated successfully, but these errors were encountered: