fix(components): [form] catch validation error when changing rules (#8154)

This commit is contained in:
Hefty
2022-06-08 02:42:31 +08:00
committed by GitHub
parent c7ecf70969
commit 6b6c5a4a87

View File

@@ -149,7 +149,9 @@ const scrollToField = (prop: FormItemProp) => {
watch(
() => props.rules,
() => {
if (props.validateOnRuleChange) validate()
if (props.validateOnRuleChange) {
validate().catch((err) => debugWarn(err))
}
},
{ deep: true }
)