is there any way to check if a specific field isValid instead of the whole form? #11226
Unanswered
renanleonel
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Would the Otherwise, there's a |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i'm currently facing an issue with my form, because i need to add a "valid" state to each field if ti satisfies the schema validation. however, i can only check after submitting if the form is valid:
const { formState: { isValid }} = form;
the feature i need to implement is add a green border to the input if it is a valid input, before submitting the form. is it possible to verify if only a field is valid, for example, form.getValues('name').isValid?
this is my current implementation, but checking if the whole form is valid instead of the specific field:
Beta Was this translation helpful? Give feedback.
All reactions