Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No validation defined for "max:value" and "min:value" #88

Open
pmalouin opened this issue Feb 3, 2017 · 0 comments
Open

No validation defined for "max:value" and "min:value" #88

pmalouin opened this issue Feb 3, 2017 · 0 comments

Comments

@pmalouin
Copy link

pmalouin commented Feb 3, 2017

With version 0.7.0:

checkit.check('myField', -1 , ['min:0'])
    .catch(console.log.bind(console))

Returns an error with message: 'No validation defined for min'

The min/max validations did not throw in version 0.6.0, but they actually did not work as expected because they used the _.min and _.max methods of lodash that return the smallest/largest value of a collection. This does not seem to be the expected behavior as described in Checkit's documentation.

I think the best course of action would simply be to remove these validators from the documentation as they can already be accomplished with 'greaterThanEqualTo:value' and 'lessThanEqualTo:value'.

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

No branches or pull requests

2 participants