Skip to content

Commit

Permalink
port over jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonav1992 committed Aug 29, 2024
1 parent 4b85faf commit c153edf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,20 @@ export type SingleFieldValidator<

export type FieldValidationOptions<TShouldValidate = boolean> = {
/**
* Whether to run validation after field value is updated. **This will overwrite
* the top-level `validateOnChange` if set to `true`.**
* Whether to run validation after field value is updated or the field is blurred.
* Setting this prop to `false` will cancel any validation set for the field.
* Granular configuration of the field validation can be set with the `validationEvent`
* prop if set to `true` or not set.
*
* @default true
*/
shouldValidate?: TShouldValidate;
/**
* The field events for which validation should occur. *Only applies if
* `shouldValidate` is set to `true`.*
* `shouldValidate` is set to `true` or not set at all.*
*
* Not setting this prop or setting this prop to `'all'` will run validation on every field
* change or blur event.
*
* @default 'all'
*/
Expand Down

0 comments on commit c153edf

Please sign in to comment.