fix(form-item): should not validate when not have name (#5081)

pull/5084/head
zkwolf 2021-12-27 09:41:43 +08:00 committed by GitHub
parent 8beb37f64a
commit 0bc1e0a620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -199,6 +199,10 @@ export default defineComponent({
return variables;
});
const validateRules = (options: ValidateOptions) => {
// no name, no value, so the validate result is incorrect
if (namePath.value.length === 0) {
return;
}
const { validateFirst = false } = props;
const { triggerName } = options || {};