ozmat/elm-forms/1.1.0

NOTE: this package is not compatible with Elm 0.19.1

Forms.Form

Form is the top level type of the library. It is built with a Group of Fields and a Validate function. Please refer to the examples for a better understanding

Definition

type Form comparable err a
= Form (Group comparable) (Validate comparable err a)

A Form is a Group of Fields and a Validate function

Common Helpers

Group comparable
-> Validate comparable err a
-> Form comparable err a

Helps creating a Form

Form comparable err a
-> Result (List ( comparable, FieldError err )) a

Helps validating a Form. This will use the internal Validate function and Fields to run the validation process, then it will convert the FormValidation into a Result.

Form comparable err a
-> Result (Dict comparable (FieldError err)) a

Equivalent to the previous one but returns a Dict of errors, in case of failure, instead of a List.