Comparing password fields
See original GitHub issueI am using class-validator to validate my incoming requests in an express application and I am very happy with it.
Currently I am implementing a registration service, my request has two password fields, password and password2. I would like to compare them to each other but it seems that this functionality is lacking in class-validator.
Is class-validator able to handle this scenario already or is this a feature request?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to Comparing 2 password fields - MSDN - Microsoft
How to Comparing 2 password fields RRS feed ... a simple web page in which it has First name,Second name,Login id,Password and Confirm...
Read more >Compare value in the password fields - Form
Compare value in the password fields : Password « Form « JavaScript Tutorial ; 10.10.3. Password.defaultValue ; 10.10.4. Password.focus() ; 10.10.5. Password.form.
Read more >How to compare passwords in Javascript
I have a registration page and I want to compare two passwords (input fields) to be equal before writing it to a websql...
Read more >Compare two field strings for passwords
I have the field for the new password reading the regular expressions fine. But for some reason the re-enter new password field is...
Read more >Comparing two password fields for insertion into database
I have two form fields a 'password' and 'confirmpassword' field I just want to make sure the two text strings match.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

IsLongerThan looks promising, I will try that. Thanks for your work!
Regards, Christian
Unfortunately this code doesn’t compile.
The version of typescript is
It works when the second param is not optional.