Adding equal to greater than, equal to less than form validators. #1009

wants to merge 1 commit into


None yet
3 participants

NickBusey commented Feb 2, 2012

I think this is very useful.

I have seen some say this feature is unnecessary as you can just decrement the number in question. In other words, to make sure it's equal to or greater than 0, make the number -1.

This causes two problems, first and most importantly it's broken. -.5 would be valid in this case, which is clearly NOT equal to or greater than 0.

Also, the error messaging is ugly. "The amount field must contain a number greater than -1" looks unprofessional and hacky, whereas "The amount field must contain a number equal to or greater than 0." is far nicer and easier to understand.


seejohnrun commented Feb 7, 2012

I definitely think this belongs in CI, thanks for the great description.
I wonder if greater_than_equal_to is a better name - any reason you chose this way?


NickBusey commented Feb 7, 2012

No reason at all, I actually prefer your naming convention.

I've renamed the functions and modified the pull request.


seejohnrun commented Feb 8, 2012

I'd like to see the documentation cleaned up to something like:


NickBusey commented Feb 10, 2012



narfbg commented Oct 22, 2012

Already implemented.

narfbg closed this Oct 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment