mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
修复 spreadArray 报错问题
This commit is contained in:
parent
498a848900
commit
514b98fc53
@ -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