Skip to content

Instantly share code, notes, and snippets.

@beckyconning
Forked from anonymous/gist:64052620fcd77dd74349
Last active August 29, 2015 14:22
Show Gist options
  • Save beckyconning/318ba19a8dfe11535315 to your computer and use it in GitHub Desktop.
Save beckyconning/318ba19a8dfe11535315 to your computer and use it in GitHub Desktop.
clearErrors :: forall e. Eff (dom :: DOM, trace :: Trace | e) [Unit]
clearErrors = traverse ((>>= maybeClear) <<< fieldErrorNode) allFields
where
maybeClear = maybe (return unit) clear
clear node = setInnerHTML "" node >>= \_ -> return unit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment