diff options
author | Joris | 2015-10-04 21:15:15 +0200 |
---|---|---|
committer | Joris | 2015-10-04 21:15:15 +0200 |
commit | ee3027b53aad38178f4945c459a94489f4997507 (patch) | |
tree | 0bd93793ac2ea22bdfbe9398a08685246391cce9 /src/client | |
parent | d920dd95be096dcaa2fa2314d729fdff52631fd6 (diff) |
Do not authorize negative incomes
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/Model/View/LoggedIn/Account.elm | 2 |
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)) |