Skip to content
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

FEATURE: 关于表单的验证问题请教 #5437

Open
3 tasks done
cbombonera opened this issue Jan 19, 2025 · 0 comments
Open
3 tasks done

FEATURE: 关于表单的验证问题请教 #5437

cbombonera opened this issue Jan 19, 2025 · 0 comments
Labels

Comments

@cbombonera
Copy link

cbombonera commented Jan 19, 2025

Version

Vben Admin V5

Description

昨天咨询
formFieldProps: {
validateOnBlur: true,
validateOnChange: false,
validateOnModelUpdate: false,
},
并且 validateOnInput = false
确实是可以在失去焦点再验证

但是好像并没解决我想要的结果

这个只是在失去焦点时候 验证结果渲染到界面,而我关心的并不是界面效果,而是执行次数

执行次数 和 input change 次数是一样的,也就是输入一个字符 执行一次

对这个验证不熟悉,望告知怎么解决

主要考虑 bulr 就是有可能 验证结果比较慢,比如远程或者 try Cathy 不想多次执行

验证 规则 是用的 z.toString().refine

我打印了日志,输入一个字符 执行一次

Image

Image

Proposed Solution

同上,望告知怎么解决,谢谢

Alternatives Considered

No response

Additional Context

No response

Validations

  • Read the docs
  • Ensure the code is up to date. (Some issues have been fixed in the latest version)
  • I have searched the existing issues and checked that my issue does not duplicate any existing issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants