-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jqueryvalidation and pwstrength seem to conflict #35
Comments
I've never tried to use jquery validation and pwstrength at the same time, I don't know if they are incompatible. If you set up a codepen, jsfiddle or similar example with both libraries working at the same time I can look at it. There is a Regards. |
I've created a fiddle that demonstrates the issue described: If you put in a valid email address (foo@gmail.com) but violate the pwstrength rules (eg: don't enter anything -> too short), this also should be invalid because the empty field would violate the require on password from jquery validation. Clicking the button reports "valid" which seems like it means somehow pwstrength and validation are colliding. Since 0 chars = too short = invalid, I don't really need to use jQuery validation on the password field. However, I would need some kind of "if blahblah" that I can leverage with pwstrength to tell me if the current password is "valid". I'll give your onKeyUp method a try. |
For reference: This will assign a score to a variable on keyup and, only if the rest of the form is valid and the score is positive, will it alert "valid". |
Sorry for being dumb - how would I call forceUpdate? Or I guess, who/what is it a method on? |
This issue is actually irrelevant. jQuery Validation uses the name of the field, not the id. This demonstrates that this is not actually a problem. |
Given the following code involving validation and pwstrength:
jQueryValidation will validate all fields in the form when clicking #encrypt-button except the password field. Basically, nothing happens.
If the two are truly incompatible, is it possible to call some kind of function to force pwstrength to update progress, errors and verdict? Is there a function to evaluate the current score?
If I could determine that the current score was negative via a function call, I could use that along with .valid() to decide whether or not to proceed. And, if I could call a function to force pwstrength to update the progress, errors and verdict, it would end up setting the field to the correct error state (assuming the field was invalid).
Thanks!
The text was updated successfully, but these errors were encountered: