Skip to content

Commit

Permalink
fix invalid with custom error
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Nov 30, 2019
1 parent 80c9de5 commit 8704778
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ export default function useForm<FormValues extends FieldValues = FieldValues>({
isValid: fieldsWithValidationRef.current.size
? !isEmptyObject(fieldsRef.current) &&
validFieldsRef.current.size >=
fieldsWithValidationRef.current.size
fieldsWithValidationRef.current.size &&
isEmptyObject(errorsRef.current)
: false,
}),
};
Expand Down

0 comments on commit 8704778

Please sign in to comment.