Skip to content

Commit 3e17065

Browse files
rootroot
authored andcommitted
validate when has errors or warnings
1 parent 38c629a commit 3e17065

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/useForm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,8 @@ export class FormStore {
900900
namePathList.push(field.getNamePath());
901901
}
902902

903-
// Skip if without rule
904-
if (!field.props.rules || !field.props.rules.length) {
903+
// Skip if without rule , warnings and errors
904+
if ((!field.props.rules || !field.props.rules.length)&&field.getErrors().length === 0 && field.getWarnings().length === 0) {
905905
return;
906906
}
907907

0 commit comments

Comments
 (0)