mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-25 09:21:57 +03:00
Add a global psuedo-field.
This commit is contained in:
parent
944b78bce4
commit
bce99b7ea5
@ -3,6 +3,7 @@ module Form.Validation exposing
|
||||
, andMap, andThen, fail, fromMaybe, fromResult, map, map2, parseWithError, succeed, withError, withErrorIf, withFallback
|
||||
, value, fieldName, fieldStatus
|
||||
, map3, map4, map5, map6, map7, map8, map9
|
||||
, global
|
||||
)
|
||||
|
||||
{-|
|
||||
@ -77,6 +78,16 @@ succeed parsed =
|
||||
Validation Nothing Nothing ( Just parsed, Dict.empty )
|
||||
|
||||
|
||||
{-| -}
|
||||
global : Field error () Never
|
||||
global =
|
||||
Validation Nothing
|
||||
(Just "$$global$$")
|
||||
( Just ()
|
||||
, Dict.empty
|
||||
)
|
||||
|
||||
|
||||
{-| -}
|
||||
withFallback : parsed -> Validation error parsed named constraints -> Validation error parsed named constraints
|
||||
withFallback parsed (Validation viewField name ( maybeParsed, errors )) =
|
||||
|
Loading…
Reference in New Issue
Block a user