Skip to content

[Feature] Add input validation across all API endpoints #6

Description

@lechan775

Problem

当前 API 缺少输入校验:

  • 注册时无密码强度限制(可输入 1 位密码)
  • 无账号格式校验(空字符串、超长字符串均可通过)
  • 提交答案时无 wordId 合法性校验

Proposed Solution

  1. Controller 层添加 @Valid + Bean Validation 注解
  2. 注册密码:最少 8 位,含字母+数字
  3. 账号:3-20 位字母数字下划线
  4. Service 层添加业务校验(如 wordId 是否存在)

进展

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions