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

fix: Passwords validations in signup form [PT-187798321] [PT-187798313] #1326

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

dougmartin
Copy link
Member

@dougmartin dougmartin commented Jun 14, 2024

With the update to React 18 the Formsy input validations broke as they relied on state updates being done before the validations.

This commit changes the password confirmation validation to use a function that compares the passed form values. It also updates the the password length validations to remove the max length validation.

@dougmartin dougmartin requested a review from pjanik June 14, 2024 21:43
With the update to React 18 the Formsy input validations broke as they relied on state updates being done before the validations.

This commit changes the password confirmation validation to use a function that compares the passed form values.  It also updates the the password length validations to remove the max length validation.
@dougmartin dougmartin force-pushed the 187798321-fix-passwords-do-not-match branch from fd1a439 to a3704cb Compare June 14, 2024 21:49
Copy link
Member

@pjanik pjanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the ,maxLength:10 might be my fault. I think I added that when I was fixing the Formsy-based code and wanted to test how the (multiple) validations work. I probably forgot to remove it afterward.

With the update to React 18 the Formsy input validations broke as they relied on state updates being done before the validations.

Hm, currently, everything works if the password contains both letters and numbers, but it fails when the password contains only numbers. How is this related to the React state?

If your custom validator fixes this issue (in theory both approaches should work the same), then that's great. However, I just want to ensure that we are indeed addressing the reported problem.

@dougmartin dougmartin merged commit d61d2d6 into hotfix-2.12.2 Jun 17, 2024
9 checks passed
@dougmartin dougmartin deleted the 187798321-fix-passwords-do-not-match branch June 17, 2024 11:22
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

Successfully merging this pull request may close these issues.

2 participants