Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State that isValid only works with modes: onChange and onBlur #151

Closed
iamdevlinph opened this issue Jan 20, 2020 · 11 comments · Fixed by #153
Closed

State that isValid only works with modes: onChange and onBlur #151

iamdevlinph opened this issue Jan 20, 2020 · 11 comments · Fixed by #153
Labels
question Further information is requested

Comments

@iamdevlinph
Copy link
Contributor

iamdevlinph commented Jan 20, 2020

I'm not sure if this is stated but it would great to have this beside the isValid.

image

I can open a PR later for this minor thing if needed.

@bluebill1049
Copy link
Member

hey @iamdevlinph what's the usage of isValid for onSubmit mode?

@bluebill1049 bluebill1049 added the question Further information is requested label Jan 20, 2020
@iamdevlinph
Copy link
Contributor Author

I was expecting it to work this way.

When user triggers a submit then the whole form validation is triggered. But if the user only updates a field then that should also update the formState.isValid

@iamdevlinph
Copy link
Contributor Author

Since in a sense, the state of the form has been updated because the user updated a field.

@bluebill1049
Copy link
Member

then that's more of usage for onChange validation mode right?

@bluebill1049
Copy link
Member

happy to adjust for a good reason from UI perspective.

@bluebill1049
Copy link
Member

or i can update the documentation to reflect this.

@iamdevlinph
Copy link
Contributor Author

Yes. Just an update to the documentation would be nice. Since it was not obvious to me that the formState.isValid doesn't work the way I imagined it 😅

No need to make changes to the functionality.

@bluebill1049
Copy link
Member

you want to submit a PR @iamdevlinph ? would love to see your name at contribution list.

@iamdevlinph
Copy link
Contributor Author

Sure. I'll open one later. Though it's just a minor change lol

@bluebill1049
Copy link
Member

it's good to have your name on the list, you help quite bit on bug and answering questions at spectrum. thank you

@iamdevlinph
Copy link
Contributor Author

No worries. This package also helped me a lot 👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants