Exposes various types used to track state of the form.
A type for errors that can be generated by a Validator
The state of the form. Stores all the values and the status of each field.
A validator is a function that can be used to validate the value of a form or a widget.
A widget that can be used to create a form field.
Creates a validator that always succeeds.
Useful for forms that fully rely on per-field validations.
Marks all fields as blurred. This is needed to show all errors when trying to submit a form without the user having visited all fields.
Internal: Used to recursively blur child fields.
Specifies the effect of a field with relation to the focus state.
A unique identifier for a field in a form.
Specifies the operation to perform on a field. Add and Remove are
used for list fields.
The status of a field. We'll only expose the result of a field validation after it has been blurred.
List fields need an index additional to the FieldId to know which list item to update.
Is returned from the update function of a Widget
Encodes the update for the given field.
Decodes a form state from a JSON value
Encodes a form state into a JSON value
Wraps the given model with the indication that the field was changed in a way that it must also have been focused.
Wraps the given model with the indication that the field was changed but didn't change the focus.
Calculates the dom id for the given field and subfield.
Updates the status of a field based on an effect
Helper to check if a field was visited
Wraps the given model with the indication that the field was blurred.
Wraps the given model with the indication that the field was focused.
Updates the value for the given field.
You can provide a function that generates a list of attributes for the inner widget. This function can use the current value and errors to generate the attributes.
The default for a Widget
A unique identifier for a field in a form.