Skip to content

Instantly share code, notes, and snippets.

Created May 27, 2015 17:33
Show Gist options
  • Save anonymous/64052620fcd77dd74349 to your computer and use it in GitHub Desktop.
Save anonymous/64052620fcd77dd74349 to your computer and use it in GitHub Desktop.
clearErrors = traverse ((>>= maybeClear) <<< fieldErrorNode) allFields
where
maybeClear = maybe (return unit) clear
clear node = setInnerHTML "" node >>= \_ -> return unit
allFields = [ FirstNameField
, LastNameField
, StreetField
, CityField
, StateField
, PhoneField HomePhone
, PhoneField CellPhone
, PhoneField WorkPhone
, PhoneField OtherPhone
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment