mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-01 07:45:22 +03:00
Remove codec dependency from Form API.
This commit is contained in:
parent
2785d4a84b
commit
f496bf3508
12
src/Form.elm
12
src/Form.elm
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user