Skip to content

Conversation

@Starpuccino
Copy link

@Starpuccino Starpuccino commented Oct 30, 2025

问题描述

本 PR 修复用户名密码校验规则的不一致问题,确保前端表单验证与后端验证规则相符。

登录表单

<Input 
  id="username"
  required
  // 无前端长度限制,由后端验证
/>
<Input 
  id="password"
  required
  // 无前端长度限制,由后端验证
/>

注册表单

<Input 
  id="username"
  required
  minLength={3}
  maxLength={20}
/>
<Input 
  id="password"
  required
  minLength={8}  // 改为 8,与后端一致
/>
<Input 
  id="confirmPassword"
  required
  minLength={8}  // 改为 8,与后端一致
/>

- Update login form username validation: minLength 1 → 3
- Update login form password validation: add minLength 8
- Update register form username validation: minLength 1 → 3
- Update register form password validation: minLength 6 → 8
- Ensure consistent validation rules between frontend and backend
- Closes auth validation mismatch issue
@Starpuccino Starpuccino changed the title fix: align auth form validation rules with backend requirements chore: remove login form username and password length validation Oct 30, 2025
@Starpuccino Starpuccino changed the title chore: remove login form username and password length validation fix form auth validation rule Oct 30, 2025
@Starpuccino Starpuccino changed the title fix form auth validation rule fix: 修复注册账号前后端密码校验规则不一致问题 Nov 3, 2025
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.

1 participant