thomashoneyman
released this
Assets
2
This release represents a major change to Formless and brings in the following functionality:
-
You can now generate a record of symbol proxies from your
Formtype, reducing boilerplate -
Validation and modification is now performed on a per-field basis with variants, rather than on the entire form using lenses; this fixes the limitation in Formless where validation would run across all fields when any field was changed and makes effectful validation possible.
-
Validators have access to the full form state on each run, as well as are able to access parent state for values from other forms to validate against.
-
FormSpechas been renamed toInputField;InputFieldhas been renamed toFormField -
There is a new
Validationtype which wraps a function from your overall form to a particular field input to someEither error outputresult. Polyform andpurescript-validationadapters have been removed, as you can simply use thetoEitherfunctions from those libraries to make them compatible with Formless. -
The Polyform example has been removed.
-
There are now
modify,modifyValidate, andvalidatehelpers which will create a correct Formless query from a symbol proxy for these major controls. See the overview for more information. There are alsomodify_,modifyValidate_, andvalidate_versions which specify aUnitresult for the query.