fix(auth): validate display name only when required in sign-up form#2383
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the form validation logic in SignUpUI to ensure the form is considered valid when the display name is not required, even if it is left empty. It also introduces a new unit test class SignUpUITest to verify this behavior. The review feedback suggests improving the robustness of the new test by combining text and click action matchers to locate the sign-up button, preventing potential AmbiguousNodeException errors in certain locales.
russellwheatley
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2381
SignUpUI'sisFormValidalways validateddisplayName, even whenAuthProvider.Email.isDisplayNameRequired = falseand the field is hidden. Since the hidden field's value stays "",GeneralFieldValidatoralways treated it as a missing required field, so the sign-up button could never become enabled.Now the display name check is skipped when
isDisplayNameRequiredis false.Added
SignUpUITestcovering this case (name field hidden, other fields valid, sign-up button enabled) — verified it fails on the old code and passes with the fix.