[PR #35] fix: 修复注册账号前后端密码校验规则不一致问题 #37

Open
opened 2026-03-01 14:53:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/beilunyang/moepush/pull/35
Author: @Starpuccino
Created: 10/30/2025
Status: 🔄 Open

Base: mainHead: fix/auth-validation


📝 Commits (2)

  • a20f69f fix: align auth form validation rules with backend requirements
  • c7501e0 chore: remove login form username and password length validation

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 components/auth/register-form.tsx (+2 -2)

📄 Description

问题描述

本 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,与后端一致
/>

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/beilunyang/moepush/pull/35 **Author:** [@Starpuccino](https://github.com/Starpuccino) **Created:** 10/30/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/auth-validation` --- ### 📝 Commits (2) - [`a20f69f`](https://github.com/beilunyang/moepush/commit/a20f69f539442b4fd15e77d5a904c8fb234e03e2) fix: align auth form validation rules with backend requirements - [`c7501e0`](https://github.com/beilunyang/moepush/commit/c7501e04e297dbe3f2e8528c625f04326e762448) chore: remove login form username and password length validation ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `components/auth/register-form.tsx` (+2 -2) </details> ### 📄 Description ## 问题描述 本 PR 修复用户名密码校验规则的不一致问题,确保前端表单验证与后端验证规则相符。 ### 登录表单 ```tsx <Input id="username" required // 无前端长度限制,由后端验证 /> <Input id="password" required // 无前端长度限制,由后端验证 /> ``` ### 注册表单 ```tsx <Input id="username" required minLength={3} maxLength={20} /> <Input id="password" required minLength={8} // 改为 8,与后端一致 /> <Input id="confirmPassword" required minLength={8} // 改为 8,与后端一致 /> ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/moepush#37
No description provided.