Remove codec dependency from Form API.

This commit is contained in:
Dillon Kearns 2022-01-15 16:04:54 -08:00
parent 2785d4a84b
commit f496bf3508

View File

@ -1,6 +1,5 @@
module Form exposing (..)
import Codec exposing (Codec)
import DataSource exposing (DataSource)
import Date exposing (Date)
import Dict exposing (Dict)
@ -57,11 +56,7 @@ http url_ (Form fields decoder serverValidations modelToValue) model =
}
)
(Decode.field "raw" (Decode.nullable Decode.string))
(Decode.field "errors"
(Decode.list
(Codec.decoder errorCodec)
)
)
(Decode.field "errors" (Decode.list Decode.string))
)
)
, timeout = Nothing
@ -70,11 +65,6 @@ http url_ (Form fields decoder serverValidations modelToValue) model =
}
errorCodec : Codec String
errorCodec =
Codec.string
type alias RawModel error =
{ fields : List ( String, List error )
, formErrors : Dict String (List error)