Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Created November 24, 2017 20:17
Show Gist options
  • Save Chadtech/aab5edb0d1105473602771d9fe1ae4cd to your computer and use it in GitHub Desktop.
Save Chadtech/aab5edb0d1105473602771d9fe1ae4cd to your computer and use it in GitHub Desktop.
update msg model =
case msg of
LoginClicked ->
attemptLogin model
FormSubmitted ->
model
|> validate
|> attemptLogin
update msg model =
case msg of
FormEnter ->
let
(validatedModel, _) =
update Validate model
(newModel, cmd) =
update Login validatedModel
in
update Login validatedModel
Login ->
attemptLogin model
Validate ->
validate model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment