Change-password form: surface validation (strength, mismatch, inline, client-side) - #106
Merged
Merged
Conversation
… client-side) The profile Security form flagged fields with a red icon but no explanation, and the password strength meter never appeared. Three real gaps: - Field errors weren't localized. A validator can set its message to a semantic key (Tiger_Validate_Password → password.too_short); _formErrors shipped that raw key to the client. Now _formErrors translates each field message the same way messages[] already are (non-key prose passes through). Adds the password.* policy strings + core.form.password_mismatch to core lang. - The confirm field returned Zend's default "The two given tokens do not match". Give the Identical validator a custom message key → "Passwords do not match." - The strength meter (tiger.password-strength.js) was only loaded by the auth layout, so data-tiger-strength did nothing on the account-layout profile page. Load it in the Security partial. The view now renders each field's (localized) message inline in an .invalid-feedback, clears it on input, and does a client-side new/confirm match check before the round trip. Verified on dev-com: weak → "Password is too short…", mismatch → "Passwords do not match." Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
WebTigers
added a commit
that referenced
this pull request
Aug 7, 2026
…on UX (#107) Bug-fix release: the single-use CSRF token (#105) and the change-password form's validation surfacing — localized inline field errors, the strength meter on the profile page, a clear 'Passwords do not match', and a client-side match check (#106). Also backfills the 0.51.0-beta CHANGELOG entry that was skipped. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Follow-up to #105 (CSRF token). The profile Security / change-password form flagged fields with a red icon but no explanation, and the strength meter never showed. Three real gaps, from the reported screenshot:
1. Field errors weren't localized → messages showed as raw keys (or not at all)
Tiger_Validate_Passwordsets its message to a semantic key (password.too_short);_formErrorsshipped that raw key to the client, and the view only added.is-invalid(red icon) without rendering any message. Now:Tiger_Service_Service::_formErrorstranslates each field message the same courtesymessages[]already get viaTiger_Model_MessageObject(non-key prose passes through unchanged).password.*policy strings +core.form.password_mismatchtocore/languages/en/core.php..invalid-feedback.2. Mismatch said "The two given tokens do not match"
The confirm field's
Identicalvalidator now carries a custom message key → "Passwords do not match."3. Strength meter never appeared on this page
tiger.password-strength.jswas loaded only by the auth layout, sodata-tiger-strengthwas inert on the account-layout profile page. It's now loaded in the Security partial (the meter auto-attaches).Plus: client-side match, no wasted round trip
The view checks new === confirm before posting (shows "Passwords do not match." inline and returns), and clears a field's error on input.
Verified on dev-com
new_password: "Password is too short — please use at least 8 characters."confirm_password: "Passwords do not match."/user/profile.🤖 Generated with Claude Code