Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ValidateActionOptions

Options for FormupContext.validate.

Hierarchy

  • ValidateActionOptions

Index

Properties

Optional at

at: string | string[]

What field to validate.

<input use:validate={{ at: 'email' }}>

If at is not provided and the element is not a form it defaults to:

  • the data attribute pathAt
  • the name attribute
  • the path of the element referenced by the for attribute
  • the id attribute

If the only option is at it can be used directly:

<input use:validate={'email'}>

If no field has been found it validates itself and all its children.

Optional debounce

debounce: undefined | number

Timeout in milliseconds after which a validation should start.

defaultvalue

FormupContext.debounce

Optional dirtyOn

dirtyOn: EventName | EventName[]

Override which events should mark a field as dirty.

defaultvalue

ValidateActionOptions.on, FormupContext.dirtyOn

Optional on

Override which events should trigger a validation and mark a field as dirty.

Optional validateOn

validateOn: EventName | EventName[]

Override which events should trigger a validation.

<input use:validate={{ validateOn: ['input', 'change'] }}>

<input use:validate={{ validateOn: 'blur' }}>
defaultvalue

ValidateActionOptions.on, FormupContext.validateOn

Generated using TypeDoc