Simple forms made easy: A Dict implementation of the core Json.Decode API,
with state lifecycle and input helpers for the views.
Input types to determine live validation behaviour.
Form to embed in your model. Type parameters are:
customError - a custom error type to extend built-in errors (set to () if you don't need it)output - the type of the validation output.Field state containing all necessary data for view and update,
can be retrived with Form.getFieldAsString or Form.getFieldAsBool.
path - qualified path of the field in the form, with dots for nested fields (field.subfield)value - a Maybe of the requested typeerror - a Maybe of the field errorliveError - same but with added logic for live validation
(see getLiveErrorAt impl)isDirty - if the field content has been changed since last validationisChanged - if the field value has changed since last init/resethasFocus - if the field is currently focusedInitial form state. See Form.Field for initial fields, and Form.Validate for validation.
Update form state with the given message
Get field state at path, with value as a String.
Get field state at path, with value as a Bool.
return a list of indexes so one can build qualified names of fields in list.
Get form submission state. Useful to show errors on unchanged fields.
Get list of errors on qualified paths.
Get set of changed fields.
Form messages for
update.