Closed lesliev closed 7 years ago
@lesliev Thanks for reporting this, we'll have a look to see what is the issue.
Hi @lesliev,
Curious, is it the combination of Rails 5 & Devise 4.2 that renders incompatibility? Have you checked if it is incompatible with one or the other? (Rails 5 only or Devise 4.2 _only)
This might not be a Rails 5 specific issue, try downgrading to 2.1.1. See https://github.com/bitzesty/devise_zxcvbn/issues/24
@lesliev
I've tested with these gems and it works. Probably you had the different version of devise_zxcvbn
could you provide what was the version at the time of testing?
Tested password: 123456789
rails (5.0.0)
devise (= 4.2.0)
devise_zxcvbn (4.4.1)
I guess it's not related to rails 5.0.0 because in this version there are not any changes in Active Model::Validations
that might skip the validation of this gem. Probably you skipped all validations by saving an object via save(validate: false)
@lesliev
@lesliev
I've tested on a new project with rails 5.0.2, devise 4.2.0 and devise_zxcvbn 4.4.1. devise_zxcvbn works as expected and displays validation error about the weak password score.
Closing this for now unless you provide a sample application that reproduces the error.
Thanks for looking at this everyone, for some reason I missed all the emails. I was using 5.0.0 at the time but I've moved versions since then and made a lot of changes so it would be fairly impossible to get back to the state I was in. Best to close this, as you did!
This doesn't seem to work for Rails 5.0.0 and Devise 4.2.0 - it looks as if the code isn't called at all. I've not had time to dig into it, I just bypassed the problem with my own validation, similar to this: https://github.com/plataformatec/devise/wiki/How-To:-Set-up-simple-password-complexity-requirements.