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

Add isBlurred state check #939

Closed
Pascalmh opened this issue Sep 5, 2024 · 0 comments · Fixed by #938
Closed

Add isBlurred state check #939

Pascalmh opened this issue Sep 5, 2024 · 0 comments · Fixed by #938

Comments

@Pascalmh
Copy link
Contributor

Pascalmh commented Sep 5, 2024

Add a isBlurred state check so a field can be validated onChange after it has been blurred once.

Usage example once it is implemented:

validators={{
	onChange: ({ value, fieldApi }) => {
		if (fieldApi.form.getFieldMeta("firstName")?.isBlurred) {
			// validation code goes here
		}

		return undefined;
	},
}}

Idea came up in Discord: https://discord.com/channels/719702312431386674/1263506167901065246

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 a pull request may close this issue.

1 participant