Skip to content

Why does isValid require all fields to be touched? #47

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

Closed
jdevine opened this issue Jul 25, 2020 · 4 comments · Fixed by #75
Closed

Why does isValid require all fields to be touched? #47

jdevine opened this issue Jul 25, 2020 · 4 comments · Fixed by #75
Assignees
Labels
bug Something isn't working released

Comments

@jdevine
Copy link

jdevine commented Jul 25, 2020

I see that isValid from createForm is not called anywhere except a test, and the requirement that all fields need to be touched to return true doesn't make a lot of sense to me.

Should the function be removed?

@callmeberzerker
Copy link

callmeberzerker commented Jul 31, 2020

Yeah, this is a bug 100%. (since the lib aims to mirror formik api that's not how it works in formik -> if anything is touched the form is by definition itself touched). You do not expect a user to enter / touch all fields - especially when he is doing a partial update on a record.

This PR seems to fix it but it has conflicts: #28

@tiaanduplessis tiaanduplessis self-assigned this Aug 14, 2020
@tiaanduplessis tiaanduplessis added the bug Something isn't working label Aug 14, 2020
@tiaanduplessis
Copy link
Collaborator

@jdevine thank you for opening up the issue. I agree that this isn't the desired behavior and will address it over the weekend

@subpx
Copy link
Contributor

subpx commented Dec 9, 2020

Ive fixed this. Will raise a PR once a pending PR of mine is merged.

@tjinauyeung
Copy link
Owner

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants