rtfeldman / elm-validate

Convenience functions for validating Elm data.
http://package.elm-lang.org/packages/rtfeldman/elm-validate/latest
BSD 3-Clause "New" or "Revised" License
145 stars 28 forks source link

Fixed ifNotFloat #36

Open MalgAmoe opened 5 years ago

MalgAmoe commented 5 years ago

Fixed ifNotFloat to create an error in case it could not be parsed to a float. Previously it was creating the error in case it could be parsed to a float.

grillbiff commented 5 years ago

any update on this?

ewan-laws commented 5 years ago

ifNotFloat doesn't seem to be working for me either.

MalgAmoe commented 5 years ago

Yes the logic is inverted, that is why I tried to submit this merge request. I don't know if I did something wrong with the merge request, I am new to this kind of things.

ewan-laws commented 5 years ago

Thanks, I'm new too, I'm assuming your commit works so I'm going to simply copy the contents of Validate.elm with your fix and see if I can get things working.

ewan-laws commented 5 years ago

Tested it and it works, thanks.

I guess this is a good argument for automated tests

ivarni commented 5 years ago

I spent the last hour staring at my code to figure out what was going wrong and then it was this :rofl: