A Form Validation Library for Elm
billperegoy
274

Hi! nice article. I’m learning Elm and was trying to build some kind of form library too. I come from a React background so I’m trying to replicate some of the features available on react-jsonschema-form which is a great component.

Apart from the issue of pre-loading values into the fields and validations against the whole form model (for the “repeat password” case) another thing I fail to achieve is a simple way of preventing form submit if there are any validation errors, e.g. on the update function branch handling de Submit message I want to return a Cmd.none in the case of errors or a HTTP request command if validations pass. Maybe some kind of Form.hasErrors function could be provided?

Like what you read? Give Pablo Enrici a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.