mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
isRequired 空数组也不能通过
This commit is contained in:
parent
84cafd0755
commit
bab2f59ba2
@ -21,7 +21,7 @@ export const validations:{
|
||||
[propsName:string]: ValidateFn
|
||||
} = {
|
||||
isRequired: function (values, value:any) {
|
||||
return value !== undefined && value !== '' && value !== null;
|
||||
return value !== undefined && value !== '' && value !== null && (!Array.isArray(value) || !!value.length);
|
||||
},
|
||||
isExisty: function (values, value) {
|
||||
return isExisty(value);
|
||||
|
Loading…
Reference in New Issue
Block a user