Closed skinnyjames closed 7 years ago
I think it was deliberately removed in favor of
let
s = Just "foo"
in
Textfield.render … [ Textfield.error (Maybe.withDefault "" s) |> when (s /= Nothing) ] []
It is a bit more verbose, but I guess it either fits Html module better or it is less confusing because you do not have to know what functions expect Just a
and what functions expect just a
.
Please re-open if you have any concerns. But I think we will not change the API in that regard any time soon.
Not gonna reopen, but I don't think it's just more verbose.... I think it abstracts the Material.Textfield configuration (in which error is a Maybe String) in a way that I (maybe only I) don't really see the benefit of.
Pretty new to the ecosystem though, is this idiomatic Elm?
Awesome library!
It looks like an earlier version of this library took a Maybe String for a Textfield Model. Does that functionality still exist?
This would be useful for server side validation when an error might not exist.