The current form's data model value. NOTE: Does NOT perform render. see .render();
Gets default value by path.
Indicates if the field/element is dirty.
Exposes access to the hook's bound element in your form. This allows you to get/set properties directly on your element.
Returns the current errors for a field/element.
Returns true when the field/element has errors and is invalid.
Returns the current top error for a field/element.
Returns current error messages for a field/element.
The element name, name of hook.
The data path in your model which this field/element gets/sets data from.
Registers the element.
Indicates if the field/element is touched.
Unregisters the ref/field from Komo.
Returns true if the field/element is valid or without errors.
Gets the element's current value. NOTE: Does not perform render. see .render();
Causes the element to blur.
the react synthetice event.
Sets focus for element.
the react synthetice event.
Triggers a form render, useful when manually updating, valdiating elements. You should not use this method unless you're sure you need to. It will be obvious.
Resets the field removing touched, dirty and errors, sets back to default value.
Updates the value and model value for an element and performs render. When no modelValue is provided the value is used. Set validate to false if you wish to validate manually.
the value to update to.
optional model value.
when NOT false validate the element.
Validates the field.
Validate the model at specific keys.
the key names to be validated.
Validate the model at a specific key.
the key name to be validated.
Generated using TypeDoc
Resulting object upon initializing useField.