mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-04 19:41:02 +08:00
fix(auth): align PasswordChecklist special chars with validation logic (#860)
修复密码验证UI组件与验证逻辑之间的特殊字符不一致问题。 问题描述: - PasswordChecklist组件默认接受所有特殊字符(如^_-~等) - 实际验证函数isStrongPassword()仅接受@#$%!&*?共8个特殊字符 - 导致用户输入包含其他特殊字符时,UI显示绿色勾选但注册按钮仍禁用 修改内容: - 在RegisterPage.tsx的PasswordChecklist组件添加specialCharsRegex属性 - 限制特殊字符为/[@#$%!&*?]/,与isStrongPassword()保持一致 影响范围: - 仅影响注册页面的密码验证UI显示 - 不影响后端验证逻辑 - 提升用户体验,避免误导性的UI反馈 Closes #859 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
@@ -244,6 +244,7 @@ export function RegisterPage() {
|
||||
'match',
|
||||
]}
|
||||
minLength={8}
|
||||
specialCharsRegex={/[@#$%!&*?]/}
|
||||
value={password}
|
||||
valueAgain={confirmPassword}
|
||||
messages={{
|
||||
|
||||
Reference in New Issue
Block a user