-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Forms): ensure
onBlurValidator
gets called when `validateInitia…
…lly` is true (#4069) - Relies on #4068 - Fixes #4066 At least hope it will fix it. **NB:** When using this code: ```tsx <Field.OrganizationNumber onBlurValidator={myValidator} validateInitially /> ``` it will not show the error. This is simply because internally we check if there is a value/pattern that matches. And only if it matches, the validator will run. Therefore this particular field needs a `value` or `defaultValue` to run a validator, not matter if it is an `onBlurValidator` or not. ```tsx <Field.OrganizationNumber onBlurValidator={myValidator} validateInitially defaultValue="123 331 231" /> ```
- Loading branch information
1 parent
cab6d01
commit 59cf6c5
Showing
3 changed files
with
259 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.