-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Option for automatically resetting validators #907
Changes from all commits
d35547e
8158fe0
505f89f
4aebc98
5be6b07
f3f8bf4
aa7e57d
eb01133
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,20 @@ export interface FormOptions< | |
formApi: FormApi<TFormData, TFormValidator> | ||
}) => void | ||
transform?: FormTransform<TFormData, TFormValidator> | ||
/** | ||
* When true, all previous validation errors will be cleared when running validation. | ||
* | ||
* While `true`: | ||
* - `onMount` and `onBlur` errors will be cleared when `onChange` triggers validation. | ||
* | ||
* While `false`: | ||
* - An `onMount` error will never be cleared. | ||
* - An `onBlur` error will only be cleared on the next `onBlur` event. | ||
* - An `onChange` error will only be cleared on the next `onChange` event. | ||
* | ||
* @default false | ||
*/ | ||
automaticallyResetValidators?: boolean | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The action this flag enables is that errors are removed when a new validator is run, I think we should better explain this. I like What do you think? |
||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably add an extra line on top like "Some examples:" since those aren't hardcoded rules.