Skip to content

IBX-11973: Added validation to login and forgot password screens - #2058

Open
tischsoic wants to merge 5 commits into
IBX-11959-password-requirements-infofrom
IBX-11973-account-screens-validation
Open

IBX-11973: Added validation to login and forgot password screens#2058
tischsoic wants to merge 5 commits into
IBX-11959-password-requirements-infofrom
IBX-11973-account-screens-validation

Conversation

@tischsoic

@tischsoic tischsoic commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-11973

Related PRs:

Description:

All three reported issues; validation stays on the backend.

Sign in button. It was disabled until both fields had a value (:disabled="true" plus a keyup/change toggle in login.js). Both are gone, so the button is active as the design shows. Native browser validation still stops an empty submit.

Forgot password. The constraint violation was printed under the field but the input itself stayed neutral, because form_widget_simple never derives the DS input's error prop from the field's validity. Passing it through form_row reddens the input and its label alongside the message, the way an invalid field looks elsewhere in the back office, on both the email and the login variant.

The second commit reverts a first attempt that validated in the browser — kept in history since the ticket asks for it, but out of scope for now.

Empty fields on Sign in. The form is now novalidate, so the browser no longer blocks the submit and the backend answers. Blank fields come back marked invalid with a message underneath, like forgot password; the banner is kept for failures that are not a blank field, so a wrong password still reads as "Bad credentials." rather than pointing at a field. This needs ibexa/user#143 — the failure handler flattened every BadCredentialsException, hiding which field was empty. Without it this screen falls back to the banner.

For QA:

  1. /admin/login — Sign in is active on load. Submit with both fields empty: both are marked invalid with a message each and no banner. Fill only one: only the empty one is marked. Wrong password: "Bad credentials." banner, neither field marked. Valid credentials sign in as before.
  2. /admin/user/forgot-password — submit with the field empty: it turns red and shows "This value should not be blank."; a real address sends the reset link as before.
  3. /admin/user/forgot-password/login (an email matching several accounts) — same on submit with an empty field.

Documentation:

tischsoic and others added 5 commits September 8, 2026 09:59
The Sign in button is no longer disabled until both fields are filled;
empty or malformed fields are now reported inline on submit, the same way
the rest of the back office does it, instead of native browser bubbles.

Backend errors on the forgot password screens now also mark the input
invalid, following the pattern IBX-11959 introduced on Set new password —
its error-row macro is extracted to a shared account partial.

Co-Authored-By: Claude <noreply@anthropic.com>
Validation goes back to the backend: the forgot password screens post
their empty value, and the constraint violation now also marks the input
invalid instead of only printing the message. Native browser validation
stays as the safety net on the login form.

This leaves the Set new password screen untouched, so its error-row macro
no longer needs extracting.

Co-Authored-By: Claude <noreply@anthropic.com>
The script itself was already deleted; the login and reset password
entries still pointed at it.

Co-Authored-By: Claude <noreply@anthropic.com>
An invalid field reddens both its input and its label elsewhere in the
back office; the forgot password screens only reddened the input.

Co-Authored-By: Claude <noreply@anthropic.com>
Clicking Sign in with an empty field now always submits — the browser no
longer blocks it — and the field comes back marked invalid with a message
beneath it, matching the forgot password screen. The banner is kept for
failures that are not a blank field, so a wrong password still reads as
"Bad credentials." rather than pointing at one of the fields.

Requires ibexa/user to preserve which field was blank.

Co-Authored-By: Claude <noreply@anthropic.com>
@tischsoic
tischsoic force-pushed the IBX-11959-password-requirements-info branch from 56a91bb to f5503ff Compare September 8, 2026 08:02
@tischsoic
tischsoic force-pushed the IBX-11973-account-screens-validation branch from 8e0fce5 to d00527a Compare September 8, 2026 08:05
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants