“Email is already taken” error when user logs in with client_side_validations and devise

前端 未结 1 1360
名媛妹妹
名媛妹妹 2020-12-21 15:20

I am trying to use both client_side_validations and devise in my Rails app, and get a weird bug in the log in form.

It\'s says that the email has already been taken

相关标签:
1条回答
  • 2020-12-21 15:42

    I got the answer from the author of the client_side_validations:

    For login form you don't want to have the uniqueness validator. So you'll need to do something like:

    f.text_field :email, :validate => { :uniqueness => false }
    

    From what I've understood this is the workaround because of the conditional validations in devise.

    0 讨论(0)
提交回复
热议问题