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

v0.12 使用 Form 提供的校验功能代替 Validation如何考虑的 #1007

Closed
singba opened this issue Feb 14, 2016 · 7 comments
Closed

Comments

@singba
Copy link

singba commented Feb 14, 2016

感觉比以前用起来更复杂,一些应该是组件内部完成的,是我理解错了吗
createForm、form={this.props.form}、getFieldProps

@afc163
Copy link
Member

afc163 commented Feb 14, 2016

你比较过就知道原来的写法更麻烦:http://011x.ant.design/components/validation

@azhenge
Copy link

azhenge commented Feb 14, 2016

我想把每个表单域和validator作为一组, 放单独的jsx文件里, 动态组装表单, 现在可以支持了吗

@benjycui
Copy link
Contributor

@azhengethis.props.form 传过去就行,可以参考下这个 例子.

@singba
Copy link
Author

singba commented Feb 15, 2016

@afc163 我目前只用了校验提示,没有用表单校验例子的那种方式,只是觉得createForm有点怪。
我另外封装了个DataErrorMixin来实现

@singba singba closed this as completed Feb 15, 2016
@benjycui
Copy link
Contributor

@singba 如果只是需要校验,何不直接使用 async-validator?

@singba
Copy link
Author

singba commented Feb 15, 2016

@benjycui 谢谢,我不知道,学习了

@lock
Copy link

lock bot commented May 6, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants