-
Notifications
You must be signed in to change notification settings - Fork 929
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
请问上传图片有表单验证吗 #10
Comments
上传图片没有表单验证,你想验证什么? |
就是验证必须上传 |
validate : [ { |
我这样写的,但是上传之后依旧要我上传图片,验证没有通过 |
上传组件的验证确实存在问题,这个问题下个版本会修复。目前不建议的上传组件中使用验证 |
请问可以有展示替代的办法吗 |
可以在表单提交的时候单独判断一下,这样确实比较笨拙。抱歉,下个版本一定修复。 onSubmit:()=>{
//maxLength= 1 value为String
if(!$f.getValue('uploadField')){
//TODO 没有上传图片
return false;
}
//maxLength > 1 value为Array
if(!$f.getValue('uploadField').length){
//TODO 没有上传图片
return false;
}
} |
非常感谢 |
validateField(field,callback) 请问是否可以使用这个方法替代呢 |
不行,这个还是根据validate规则验证的 |
好的,明白了,谢谢 |
trigger 请问一下,这个参数是做什么的 |
{ required: true,type:'array', message: '请选择标签', trigger: 'change' }请问其中的type:‘array’在哪些类型会用到 |
是触发验证的方式 |
谢谢 |
1.2.2 办法已发布,已修复上传组件验证问题 |
请问上传图片有表单验证吗
The text was updated successfully, but these errors were encountered: