Forms meta data
Bind to a field, used to quickly setup input
tags.
For example <input {...bind('field')} />
The field to bind this input to.
Aria label for the field. Is either the name or the name merged with the supplied ariaModel
.
Same as the aria label.
The fields name.
The current value of the field.
THe default on change handler. Takes e.target.value
and uses it as the new field value.
Has the value changed from its original.
(Optional) limit search to a single field.
Reset the form to its initial values
Returns an object of functions to be used with an input, see ControlledInput
Binds the form to useForm
.
Use as <form {...formBind()}>
Returns the required fields for a label.
Add an onChange handler for the given field.
Works with bind
.
For more control use a controlledInput
with onChange
and onRender
functions.
The function passed as a callback will be called when the form is submitted.
Callback function that is passed the current data object when the form is submitted.
Set the data to the supplied data.
The new data object to use.
Submit the form. Useful if you need a button outside the form to submit the value.
Make sure to bind the form aswell incase it is submitted by another means
Check the validation status of the form or field.
(Optional), if supplied the validation status of the given field will be returned, otherwise the whole forms status will be returned.
Defines a validator for the form.
The field to validate.
The function to validate the field, should return a boolean for valid status.
Generated using TypeDoc
The current data object