Skip to content

How to validate field after formatting field on blur. #3309

Answered by tomocrafter
tomocrafter asked this question in Q&A
Discussion options

You must be logged in to vote

I achieved it by disabling validate on blur with :validateOnBlur="false" on field that need to be formatted on blur event.
and call await validate() which can get from useField hook after formatting field in formatCardNumber method.
Although I don't know this method is right way so I am waiting for your answer.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by logaretm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant