Change argument order.

This commit is contained in:
Dillon Kearns 2022-07-25 15:15:45 +02:00
parent 67972fb945
commit fb8e23e5b6
4 changed files with 8 additions and 5 deletions

View File

@ -234,7 +234,8 @@ form =
Validation.succeed ( passwordValue, passwordConfirmationValue )
else
Validation.fail passwordConfirmation "Must match password"
passwordConfirmation
|> Validation.fail "Must match password"
)
password
passwordConfirmation

View File

@ -153,7 +153,8 @@ dependentParser =
Validation.succeed passwordValue
else
Validation.fail passwordConfirmation "Must match password"
passwordConfirmation
|> Validation.fail "Must match password"
)
password
passwordConfirmation

View File

@ -102,8 +102,8 @@ parseWithError parsed ( key, error ) =
{-| -}
fail : Field error parsed1 field -> error -> Combined error parsed
fail (Validation _ key _) parsed =
fail : error -> Field error parsed1 field -> Combined error parsed
fail parsed (Validation _ key _) =
-- TODO need to prevent Never fields from being used
Validation Nothing Nothing ( Nothing, Dict.singleton (key |> Maybe.withDefault "") [ parsed ] )

View File

@ -250,7 +250,8 @@ all =
Validation.succeed { password = passwordValue }
else
Validation.fail passwordConfirmation "Must match password"
passwordConfirmation
|> Validation.fail "Must match password"
)
|> Validation.andMap password
|> Validation.andMap passwordConfirmation