TValidateOn
type
Form & Input
Controls when field-level validation rules are evaluated — on blur, on input, on form submit, or a lazy variant of each.
TypeScript
Definition
The TypeScript definition as found in the origam source. Click the copy icon to copy the snippet.
Accepted
Values
Accepted string literal values for this type. Click a value to copy it.
- input
- Validation runs on every keystroke / value change — immediate inline feedback.
- blur
- Validation runs when the field loses focus.
- submit
- Validation runs only when the enclosing form is submitted.
- lazy blur
- First validation fires on blur; subsequent validations fire on every input after the first error was shown.
- lazy input
- First validation fires on input; once an error appears it continues on every subsequent change.
- lazy submit
- First validation fires on submit; after that errors are cleared on every input change.
- blur lazy
- Alias of "lazy blur" — validate on blur with lazy re-evaluation once an error is visible.
- input lazy
- Alias of "lazy input".
- submit lazy
- Alias of "lazy submit".
- lazy
- Defers the first validation to the next cycle that matches the default trigger (blur), then validates eagerly on every subsequent change.
Ecosystem
Used by
Components and props that accept this type as a value.
Usage
Examples
Ready-to-paste code snippets using this type.
Validate an email field on blur with lazy re-check