简体   繁体   中英

client_side_validations gem password field devise

I'm trying to setup client_side_validations for the password field in devise. One of my validations is presence of a password. The problem is in the edit form, the :password field is for the new password, which I want to allow to be blank in the case when the user is not trying to change his password.

I set up my own validations in the user model so that I could use the client_side_validations in the sign_up form. But they're interfering with the edit form.

Any suggestions on how I should proceed?

Can you try setting your Gemfile to pull from the master branch on Github and try the format noted here:

Rails 3: client_side_validations gem and devise password validations

And let me know if the issue still exists?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM