IFormField
interface
Form & Input
Internal registration record for a field inside an OrigamForm — carries the field id, validation/reset methods, the component instance, and the current valid/error state.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- idrequirednumber | string
- Unique identifier of the field within the form.
- validaterequired() => Promise<Array<string>>
- Run validation rules and return an array of error messages.
- resetrequired() => Promise<void>
- Reset the field value and clear validation state.
- resetValidationrequired() => Promise<void>
- Clear validation errors without resetting the value.
- vmrequiredRaw<ComponentInternalInstance>
- Raw reference to the field component instance.
- isValidboolean | null
- Current validity state: true, false, or null when untouched.
- errorMessagesrequiredArray<string>
- Current list of error messages for this field.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Accessing registered fields via IFormProvide