async-validator icon indicating copy to clipboard operation
async-validator copied to clipboard

validate form asynchronous

Results 129 async-validator issues
Sort by recently updated
recently updated
newest added

I use 'validator' to define rule myself, I expect the forth parameter of validator 'source' is what I passed, but it is the deeper object of what I passed. like...

字符串“123”就是一个数字,可是这个工具认为他不是数字 往往,我们就是需要判断一个字符串是不是合法的数字,但是这个工具直接判断他不是数字,太不科学

Insert the possibility to create new custom type.

I wanna validate checkbox, so I need that only true value will be acceptable. Now I try ```type="enum" enum=[true]``` But it accept true and false

我有一个注册页面,需要账户,密码,确认密码。确认密码的验证只能是validator自定义验证判断两次密码是否相同。 当确认密码与密码相同时,我修改了密码的值,这时候确认密码并没有提示错误,调用this.form.validateFields() 时竟然也通过验证了,难道需要在特殊处理这个确认密码的验证? 我认为做成同步的就可以,根据return值的类型判断是正常还是异常即可,没有必要是回调函数。 就算要使用回调函数,可否提供另一个机制触发自定义验证?

请问在调用 validate 时,添加 asyncValidator,并为之添加 Promise. 但是并没有如期返回 Promise 而是返回了 undefined 导致 .then() & .catch() 不能调用, 控制台报错 undefined. 望解答。

https://github.com/yiminghe/async-validator/blob/5fc98acd03560fe63f0ad1c03817b2dfe6fff093/src/index.js#L156 判断条件是不是要改成 `!errors.length && rule.message`

发现utils有这个方法isEmptyObject,但没有被引用

![image](https://user-images.githubusercontent.com/1670837/52695761-4af39780-2fa8-11e9-889c-20e8fede3f43.png) 如图所示,版本:1.10.1