mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 19:17:54 +08:00
修复 spreadArray 报错问题
This commit is contained in:
parent
0e7be89aa3
commit
976dff52b8
@ -192,10 +192,10 @@ export function validate(
|
||||
|
||||
const fn = validations[ruleName];
|
||||
|
||||
if (!fn(values, value, ...rules[ruleName])) {
|
||||
if (!fn(values, value, ...(Array.isArray(rules[ruleName]) ? rules[ruleName] : [rules[ruleName]]))) {
|
||||
errors.push(
|
||||
filter((messages && messages[ruleName]) || validateMessages[ruleName], {
|
||||
...['', ...rules[ruleName]]
|
||||
...[''].concat(rules[ruleName])
|
||||
})
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user