Skip to content

fix(auth): validate display name only when required in sign-up form#2383

Merged
demolaf merged 2 commits into
version-10.0.0-beta04from
fix/signup-form-validity
Jul 10, 2026
Merged

fix(auth): validate display name only when required in sign-up form#2383
demolaf merged 2 commits into
version-10.0.0-beta04from
fix/signup-form-validity

Conversation

@demolaf

@demolaf demolaf commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fixes #2381

SignUpUI's isFormValid always validated displayName, even when AuthProvider.Email.isDisplayNameRequired = false and the field is hidden. Since the hidden field's value stays "", GeneralFieldValidator always treated it as a missing required field, so the sign-up button could never become enabled.

Now the display name check is skipped when isDisplayNameRequired is false.

Added SignUpUITest covering this case (name field hidden, other fields valid, sign-up button enabled) — verified it fails on the old code and passes with the fix.

@demolaf demolaf changed the base branch from master to version-10.0.0-beta04 July 10, 2026 12:25

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread auth/src/test/java/com/firebase/ui/auth/ui/screens/email/SignUpUITest.kt Outdated
@demolaf demolaf merged commit 86c34ff into version-10.0.0-beta04 Jul 10, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in studio-2394994192-60a69 Jul 10, 2026
@demolaf demolaf deleted the fix/signup-form-validity branch July 10, 2026 13:53
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.

[Auth-UI] [v10.0.0-beta03] In AuthProvider.Email the signup form never becomes valid

2 participants