-
Notifications
You must be signed in to change notification settings - Fork 99
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
Comments
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]>
This was referenced Aug 2, 2022
This was referenced Aug 9, 2022
This was referenced Aug 19, 2022
This was referenced Sep 10, 2022
This was referenced Sep 22, 2022
This was referenced Oct 19, 2022
This was referenced Nov 1, 2022
This was referenced Nov 25, 2022
This was referenced Jul 5, 2023
This was referenced Aug 25, 2023
This was referenced Sep 23, 2023
This was referenced Jan 31, 2024
This was referenced Apr 30, 2024
This was referenced May 11, 2024
This was referenced May 24, 2024
This was referenced Jun 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
您提出的功能是否和您遇到的问题有关,请描述该问题
有时候需要只验证一个 FromItem,比如手机号验证码登录,有手机号和验证码两个FormItem,手机号填了,然后点击“获取验证码”的时候需要先验证一下手机号,但不想要验证验证码
现在只有 validateFields 全部验证,那因为验证码没有填写,验证码也会报错
您是否有建议的实现方案
![image](https://user-images.githubusercontent.com/12368329/176657240-4e4729c2-303c-47ad-81a8-e4e1d1d78f29.png)
![image](https://user-images.githubusercontent.com/12368329/176657368-f69127b4-7655-4ffd-9e37-dc30584ac137.png)
validateFields 支持传入需要验证的key,或者添加一个单个验证的方法
其它帮助我们理解您需求的描述、截图
![image](https://user-images.githubusercontent.com/12368329/176656919-38c14e16-a5b3-47dd-9bf3-40756d80f4be.png)
点击获取验证码,调用了validateFields,因为现在只有 validateFields 全部验证,因为验证码没有填写,验证码也会报错
The text was updated successfully, but these errors were encountered: