Skip to content
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

Sign up - Password validation #34

Open
jennah2121 opened this issue Apr 13, 2018 · 0 comments
Open

Sign up - Password validation #34

jennah2121 opened this issue Apr 13, 2018 · 0 comments

Comments

@jennah2121
Copy link

I'm not sure if this is working properly - I typed the same password in password and confirm password but the console.log for matching passwords doesn't show :(

Also when using a pattern attribute in the HTML you can verify that the content in that field matches the pattern using element.validity.patternMismatch e.g.

if (password.validity.patternMismatch) {
    password.setCustomValidity('Value of field doesn't match the pattern');
} else {
   password.setCustomValidity('');
}

Links if you're interested:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-constraint-validation-api
https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Form_validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant