I have a registration form where user has to enter his credentials plus a textfield called as promotion code. So the form can be submitted only when the promotion code’s value is “akpoi”. So the user has to enter this string for form submission, Otherwise it would display error message to user as “akpoi should be entered in promotional code field”. How do I check this in rails model validation??
Share
This should be check on the controller side
If u insist to do it in model do following