File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,26 @@ To validate create your own custom message:
112112validates :email, 'valid_email_2/email' : { message: "is not a valid email" }
113113` ` `
114114
115+ To validate create your dedicated validation error-message:
116+ ` ` ` yaml
117+ # set custom validation messages for each type of check in translations ie en.yml
118+ errors :
119+ messages :
120+ disallow_dotted : " contains a dot"
121+ disallow_subaddressing : " ..."
122+ disposable : " ..."
123+ disposable_domain : " ..."
124+ disposable_with_allow_list : " ..."
125+ disposable_domain_with_allow_list : " ..."
126+ deny_list : " ..."
127+ mx : " ..."
128+ strict_mx : " ..."
129+ ` ` `
130+
131+ ` ` ` ruby
132+ validates :email, 'valid_email_2/email' : { disallow_dotted: true, specific_error_messages: true }
133+ ` ` `
134+
115135To allow multiple addresses separated by comma:
116136` ` ` ruby
117137validates :email, 'valid_email_2/email' : { multiple: true }
You can’t perform that action at this time.
0 commit comments