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

[WIP] Add back form validation #493

Closed
wants to merge 12 commits into from

Conversation

crutchcorn
Copy link
Member

@aadito123 took a stab at adding back form validation - ala #466 - this is that work tracked in a PR so I don't lose track of it

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 30, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@aadito123
Copy link
Member

Still WIP. The validation logic for onChange and onBlur run but the form states are not updating as expected. Also need to implement the onMount validation.

@crutchcorn
Copy link
Member Author

No worries @aadito123 - take your time 😄

Anything I can do to help?

@crutchcorn
Copy link
Member Author

Per a convo with @aadito123 in DMs, we're deciding to add in a mount method to FormAPI. As a result, this will technically be a breaking change, as our vanilla adapters will expect us to add form.mount() prior to field.mount

This allows us more flexibility in our future API development while also enabling onMount validators

Let's make sure we're updating our tests to reflect this change

@aadito123
Copy link
Member

Feeling pretty confident in the implementation so far. Only had one test case though, so I want to add all the applicable validation test cases from the FieldApi to the FormApi tests.

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2023

Codecov Report

Attention: 32 lines in your changes are missing coverage. Please review.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
packages/form-core/src/utils.ts 89.13% <ø> (ø)
packages/react-form/src/createFormFactory.ts 100.00% <100.00%> (ø)
packages/react-form/src/formContext.ts 83.33% <ø> (ø)
packages/react-form/src/useForm.tsx 89.47% <100.00%> (+0.58%) ⬆️
...ckages/react-form/src/useIsomorphicLayoutEffect.ts 100.00% <100.00%> (ø)
packages/solid-form/src/createFormFactory.ts 100.00% <100.00%> (ø)
packages/solid-form/src/tests/utils.ts 100.00% <100.00%> (ø)
packages/yup-form-adapter/src/tests/utils.ts 100.00% <100.00%> (ø)
packages/yup-form-adapter/src/validator.ts 100.00% <100.00%> (ø)
packages/zod-form-adapter/src/tests/utils.ts 100.00% <100.00%> (ø)
... and 7 more

📢 Thoughts on this report? Let us know!.

@crutchcorn
Copy link
Member Author

Migrated to PR #505 as I've somehow managed to break my ability to push to this PR

@crutchcorn crutchcorn closed this Nov 5, 2023
@aadito123 aadito123 deleted the form-validation branch November 20, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants