From 965c0f57875e27fd09df2fc72487f4651addb79b Mon Sep 17 00:00:00 2001
From: Joris Guyonvarch
Date: Fri, 14 Aug 2015 17:43:10 +0200
Subject: Cost must not be negative

---
 src/client/Model/View/Payment/Add.elm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client/Model/View')

diff --git a/src/client/Model/View/Payment/Add.elm b/src/client/Model/View/Payment/Add.elm
index 5428c3d..5ab7a40 100644
--- a/src/client/Model/View/Payment/Add.elm
+++ b/src/client/Model/View/Payment/Add.elm
@@ -35,4 +35,4 @@ validateCost : String -> Translations -> Result String Int
 validateCost cost translations =
   cost
     |> validateNonEmpty (getMessage "CostRequired" translations)
-    |> flip Result.andThen (validateNumber (getMessage "CostMustBeNumber" translations))
+    |> flip Result.andThen (validateNumber (getMessage "CostMustBeNumber" translations) (\number -> number >= 0))
-- 
cgit v1.2.3