Hi,

I need to put some validation checks on a form, things like

if not (model.password1 == model.password2) then
    Textfield.error <| "Passwords do not match."

but I will also need to re-use those checks to enable/disable the submit 
button.

So I am thinking pull them out into functions:

checkSomething : model -> Bool

and then have some helper function that lets me combine many checks over 
the model to a Bool

checkAll : model -> List (model -> Bool) -> Bool

Sound right?

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to