Skip to content

Why is isValid always false for this form? #10653

Closed Answered by mkelley33
mkelley33 asked this question in Q&A
Discussion options

You must be logged in to vote

@leapful The form I shared here is a pared-down version of the one I'm actually using that couldn't be put in a sandbox for technical reasons. But it came down to how I used setValue on a hidden input. At first I had setValue('recaptcha', token) and Object.entries(errors).length was still zero or falsey, but isValid was also false. Then when I added options setValue('recaptcha', token, { shouldValidate: true }, isValid became true.

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@mkelley33
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@mkelley33
Comment options

@leapful
Comment options

leapful Jul 16, 2023
Collaborator

@mkelley33
Comment options

@mkelley33
Comment options

Answer selected by mkelley33
@mkelley33
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants