mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-25 09:21:57 +03:00
Add a helper for global errors.
This commit is contained in:
parent
bce99b7ea5
commit
c9b2ee3b9d
@ -11,6 +11,7 @@ module Form exposing
|
||||
, runOneOfServerSideWithServerValidations
|
||||
, AppContext
|
||||
-- subGroup
|
||||
, globalErrors
|
||||
)
|
||||
|
||||
{-| One of the core features of elm-pages is helping you manage form data end-to-end, including
|
||||
@ -755,6 +756,12 @@ errorsForField field_ (Errors errorsDict) =
|
||||
|> Maybe.withDefault []
|
||||
|
||||
|
||||
{-| -}
|
||||
globalErrors : Errors error -> List error
|
||||
globalErrors errors =
|
||||
errors |> errorsForField Validation.global
|
||||
|
||||
|
||||
{-| -}
|
||||
type alias AppContext app =
|
||||
{ app
|
||||
|
Loading…
Reference in New Issue
Block a user