Custom Validation Message
When using Rails validations, a standard error message will be provided whenever there is a violation. Consider the scenario when there is a uniqueness validation on the email attribute and it is violated:
Sometimes you don't want the default validation message. The validation declaration can be given a message
option to specify an alternate validation message.
Keep in mind that full_messages
will prepend the model name to the front of the message. You'll want to ensure that the resulting message is coherent.
Last updated