Ruby on Rails / Devise - Bypassing custom validation option in model when resetting password

前端 未结 3 1043
名媛妹妹
名媛妹妹 2021-02-06 05:00

In my project, I altered the registration form in Devise to add an :agree option via an accessor (user must accept terms of service to register, etc). If they don\'t agree, it d

3条回答
  •  有刺的猬
    2021-02-06 05:49

    I fixed this by configuring devise to update the password attributes directing if validation failed, but only if the password attributes are error free.

    See my answer here:

    Validation errors are triggered when I'm trying to reset password

提交回复
热议问题