vendredi 30 juin 2023

(Ruby on Rails validates_confirmation_of) How to switch error message to the confirmation field?

In Ruby on Rails 3.2, I am trying to validate password confirmation with this:

validates_confirmation_of :password

Rails will add the validation error to the :password field. How do I make the validation error be added to the :password_confirmation field instead?

Aucun commentaire:

Enregistrer un commentaire