Elm-field: a data type & helpers to handle input field modeling & validaton

Hey! I just published a package that I’ve been working on to help model input fields and preform validation on them. Check it out here: https://package.elm-lang.org/packages/jaredramirez/elm-field/latest/


How does it differ from the existing alternatives?


My goal with this was to be a little more bare-bones than some other existing solutions, such as elm-form and composable-form. In my usage of Elm so far, I’ve found that I prefer regular union types & helper functions, rather than complete solutions (such as the previous two links) because I find myself fighting more with the the “complete solutions” if I stray off the beaten path at all. I’ve found this to be especially true when dealing with design and layout. To that end, I wanted a data type to model any kind of input data that didn’t care about how I chose to render the input. elm-validate kind of fits this bill, but not quite in the way I wanted. I wasn’t wild about how you had to differentiate fields and check which validation was for which field. So I wrote this data type to fit with what I was looking for, then pulled it out to it’s own package to publish it. I was more inspired by things like remotedata when designing this.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.