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

内置validator没有使用说明文档 #17

Closed
gogoyqj opened this issue Nov 21, 2018 · 4 comments
Closed

内置validator没有使用说明文档 #17

gogoyqj opened this issue Nov 21, 2018 · 4 comments

Comments

@gogoyqj
Copy link

gogoyqj commented Nov 21, 2018

src/validate/index.js

没有使用文档、怎么配置错误信息的国际化 - 没有找到文档

@gogoyqj
Copy link
Author

gogoyqj commented Nov 21, 2018

最好也能支持 local设置

@quirkyshop
Copy link
Contributor

@gogoyqj 配置的使用和https://github.com/yiminghe/async-validator 完全一致

国际化的话,通过message传入国际化的变量来实现

@gogoyqj
Copy link
Author

gogoyqj commented Nov 26, 2018

我看了源码,好像没办法对于内置的比如 { required: true } - 这种默认提示进行修改,如果不做点猥琐的事情,就只有手写 message 了

@quirkyshop
Copy link
Contributor

@gogoyqj 是的,由于校验现在是直接引入第三方的校验库,后期也会做成可插拔,所以不打算对校验框架做太多定制(猥琐)的事情,手写message也可以接受,如果不是有实时切换多语言的需求的话。先关闭啦~

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