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

feat(useField) Add validation at field's level #35

Merged
merged 5 commits into from
May 1, 2019

Conversation

apanizo
Copy link
Contributor

@apanizo apanizo commented Mar 23, 2019

Description
This PR enables in useField the usage of config's getValidator.

It contains a test checking the form's validate function is not called if field one does not pass it.

The useField TS type has been updated as well.

@christophehurpeau
Copy link
Contributor

@erikras could you review this ? we would love to use this feature too :)

@erikras erikras merged commit f6cdcaf into final-form:master May 1, 2019
@erikras
Copy link
Member

erikras commented May 1, 2019

Published in v2.0.0.

@@ -51,7 +60,9 @@ describe('useField()', () => {
beforeEach(() => {
value = 'bar'
blur = jest.fn()
change = jest.fn()
change = jest.fn(() => {
debugger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has this been left in by accident?

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants