feat: password validation hints and regex pattern support (#159)#205
Open
eugenioenko wants to merge 1 commit into
Open
feat: password validation hints and regex pattern support (#159)#205eugenioenko wants to merge 1 commit into
eugenioenko wants to merge 1 commit into
Conversation
Adds two new settings — validation_password_pattern and validation_password_hint — configurable via the admin UI. The pattern is a Go regexp that new passwords must match (signup, self-service onboard, password reset); the hint is a human-readable message shown to the user. On the form, the pattern and hint are applied as HTML5 minlength, maxlength, pattern, and title attributes on the password input, so the browser shows a native validation tooltip before submit — no JS needed. Server-side validation enforces the same rules as a defense in depth. The regex is compiled once on settings save and the change is rejected with 400 if it doesn't parse, so admins can't break the form with a typo. Co-Authored-By: Claude Opus 4.6 (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.
Summary
Base branch
Depends on #204 (duration validator refactor) — stacked on `fix/validate-duration-settings`. Rebase to `main` after that lands.
Fixes #159
Test plan
🤖 Generated with Claude Code