From 60767fe1ebe6633d5e023f53071357549a34aae4 Mon Sep 17 00:00:00 2001 From: andys8 Date: Wed, 10 May 2017 00:03:01 +0200 Subject: [PATCH] Show login error message if credentials are wrong --- src/Page/Login.elm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Page/Login.elm b/src/Page/Login.elm index 420da39f60..30e453f7b5 100644 --- a/src/Page/Login.elm +++ b/src/Page/Login.elm @@ -187,7 +187,8 @@ validate = errorsDecoder : Decoder (List String) errorsDecoder = - decode (\email username password -> List.concat [ email, username, password ]) + decode (\emailOrPassword email username password -> List.concat [ emailOrPassword, email, username, password ]) + |> optionalError "email or password" |> optionalError "email" |> optionalError "username" |> optionalError "password"