提交 b7c2a17e 编写于 作者: KK's avatar KK

表单新增属性值规则 -- 长度

上级 2c8dbbcb
......@@ -336,7 +336,10 @@ import schema from 'async-validator';
if(item.type == 'SIMPLE' && this.data[name] != item.paramValue){
falg = false;
}
if(item.type == 'REGEX' && (item.isNotMode? item.RegExCode.test(this.data[name]) : (!item.RegExCode.test(this.data[name])))){
if(item.type == 'REGEX' && (item.isNotMode? item.RegExCode.test(this.data[name]) : !item.RegExCode.test(this.data[name]))){
falg = false;
}
if(item.type == 'STRINGLENGTH' && (item.isNotMode? this.data[name].length > item.minValue && this.data[name].length < item.maxValue : !(this.data[name].length > item.minValue && this.data[name].length < item.maxValue))){
falg = false;
}
});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册