Created
September 21, 2017 01:59
-
-
Save fponticelli/665c05c0d5637a691d668c4643803013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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