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

Form 能否支持单个 FormItem 的验证 #283

Closed
lzfxxx opened this issue Jun 30, 2022 · 0 comments
Closed

Form 能否支持单个 FormItem 的验证 #283

lzfxxx opened this issue Jun 30, 2022 · 0 comments

Comments

@lzfxxx
Copy link

lzfxxx commented Jun 30, 2022

您提出的功能是否和您遇到的问题有关,请描述该问题
有时候需要只验证一个 FromItem,比如手机号验证码登录,有手机号和验证码两个FormItem,手机号填了,然后点击“获取验证码”的时候需要先验证一下手机号,但不想要验证验证码
现在只有 validateFields 全部验证,那因为验证码没有填写,验证码也会报错

您是否有建议的实现方案
validateFields 支持传入需要验证的key,或者添加一个单个验证的方法
image
image

其它帮助我们理解您需求的描述、截图
点击获取验证码,调用了validateFields,因为现在只有 validateFields 全部验证,因为验证码没有填写,验证码也会报错
image

hisanshao pushed a commit that referenced this issue Jul 29, 2022
* feat: 复杂数据类型初始化、mutiLevel支持非基本数据类型的表单组件

* feat: 支持单个表单的验证 (#283)

* fix: 修复form组件实例类型错误及其它组件类型问题

* fix: 解决动态规则注册、useForm获取表单仓库方法

Co-authored-by: [email protected] <[email protected]>
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

No branches or pull requests

2 participants