Skip to content

Bug: Form的可选验证在清空数据后依然生效 #6221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks done
sw-Fang opened this issue May 17, 2025 · 1 comment
Open
5 tasks done

Bug: Form的可选验证在清空数据后依然生效 #6221

sw-Fang opened this issue May 17, 2025 · 1 comment

Comments

@sw-Fang
Copy link

sw-Fang commented May 17, 2025

Version

Vben Admin V5

Describe the bug?

当触发了Form的字段校验之后,就算清空数据不想填写数据,校验依然生效。

Image

Reproduction

官方示例

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600KF
    Memory: 3.79 GB / 63.84 GB
  Binaries:
    Node: 20.17.0 - D:\work\nodejs\node.EXE
    Yarn: 1.22.22 - D:\work\nodejs\yarn.CMD
    npm: 10.8.2 - D:\work\nodejs\npm.CMD
    pnpm: 10.6.5 - D:\work\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Relevant log output

Validations

@chenwei1109
Copy link

这里要加上 允许null 校验,zod 的校验只判断了undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants