From 8e6bbf32d6b32f51477b9a5d0ece46335724551a Mon Sep 17 00:00:00 2001 From: Yann Jubelin Date: Wed, 12 Dec 2018 15:36:02 +0100 Subject: [PATCH] Correct ifNotFloat Changed ifNotFloat to create an error in case the string cannot be parsed to a float. Previously it was creating the error if the string could be parsed to a float. --- src/Validate.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Validate.elm b/src/Validate.elm index 5ff3e34..0fe7577 100644 --- a/src/Validate.elm +++ b/src/Validate.elm @@ -209,7 +209,7 @@ ifNothing subjectToMaybe error = -} ifNotFloat : (subject -> String) -> error -> Validator error subject ifNotFloat subjectToString error = - ifTrue (\subject -> isFloat (subjectToString subject)) error + ifFalse (\subject -> isFloat (subjectToString subject)) error {-| Return an error if an email address is malformed.