aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model/View
diff options
context:
space:
mode:
authorJoris2015-10-04 21:15:15 +0200
committerJoris2015-10-04 21:15:15 +0200
commitee3027b53aad38178f4945c459a94489f4997507 (patch)
tree0bd93793ac2ea22bdfbe9398a08685246391cce9 /src/client/Model/View
parentd920dd95be096dcaa2fa2314d729fdff52631fd6 (diff)
Do not authorize negative incomes
Diffstat (limited to 'src/client/Model/View')
-rw-r--r--src/client/Model/View/LoggedIn/Account.elm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/Model/View/LoggedIn/Account.elm b/src/client/Model/View/LoggedIn/Account.elm
index ab37b81..2bb3ae7 100644
--- a/src/client/Model/View/LoggedIn/Account.elm
+++ b/src/client/Model/View/LoggedIn/Account.elm
@@ -64,4 +64,4 @@ validateIncome : String -> Translations -> Result String Int
validateIncome amount translations =
amount
|> validateNonEmpty (getMessage "IncomeRequired" translations)
- |> flip Result.andThen (validateNumber (getMessage "IncomeMustBeNonNullNumber" translations) ((/=) 0))
+ |> flip Result.andThen (validateNumber (getMessage "IncomeMustBePositiveNumber" translations) (\number -> number > 0))