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表单验证 #1019

Closed
BANG88 opened this issue Feb 16, 2016 · 6 comments
Closed

Form表单验证 #1019

BANG88 opened this issue Feb 16, 2016 · 6 comments

Comments

@BANG88
Copy link
Member

BANG88 commented Feb 16, 2016

问题:直接看图吧。
qq 20160216101814

初始化的时候设置了正确的数据类型可以通过验证,只有有修改,值就变了。

另外:怎么统一设置提示信息中文。现在的提示信息貌似是写死的,需要逐一配置message

@benjycui

@benjycui
Copy link
Contributor

下次提问不要直接 @ 某个特定的人可好 。。说不定社区的其他人本来想帮你的,看到也不懒得回复了。。

@BANG88
Copy link
Member Author

BANG88 commented Feb 16, 2016

antd的问题,应该没人。

@benjycui
Copy link
Contributor

  1. input[type=number] 或者直接用 正则校验。
  2. message 只能逐一配置,如果有可重用的 message,用变量重用即可。

另外麻烦阅读下 CONTRIBUTING.md提问的智慧

坦白说,这个也不是 antd 专有的问题。

@BANG88
Copy link
Member Author

BANG88 commented Feb 16, 2016

嗯 好,关键是现在用的rules:[{type:'number'}]来验证,这种也有问题的话,那这个验证规则在这里有什么用。

@benjycui
Copy link
Contributor

校验是直接使用 https://github.com/yiminghe/async-validator

@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

2 participants