Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module Comp.FormData exposing (..)
type FormMessage u s
= UpdateForm u
| SubmitForm s
| ResetForm
type FieldStatus valid invalid
= FieldIsIncomplete
| FieldIsValid valid
| FieldIsInvalid invalid
type FormStatus valid invalid success error
= FormFilling (FormFill valid invalid)
| FormSubmitting (FormSubmission success error)
type FormFill valid invalid
= FormIsIncomplete
| FormIsValid valid
| FormIsInvalid invalid
type FormSubmission success error
= FormWorking
| FormSuccess success
| FormError error
type alias FormField t valid invalid =
{ value : t
, message : FieldStatus valid invalid
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.