adopted-ember-addons / ember-validators

A collection of EmberJS validators
Other
24 stars 40 forks source link

Add "not" validator in Number validators #43

Closed GreatWizard closed 7 years ago

GreatWizard commented 7 years ago

I need to be sure that the user choose a number differents to another one.

I can make a second PR on ember-cp-validations to update the documentation if you want :)

offirgolan commented 7 years ago

@GreatWizard all of these not and is options can be solved by just using the inclusion and exclusion validators. Ember-cp-validations also provides a value option to modify your value before it is sent to the validator (good for formatting your date string 😉 ).

GreatWizard commented 7 years ago

I understand your point, but.. why do we have the positive validator ? it's a gte 0 or an inclusion 0-Infinity

offirgolan commented 7 years ago

@GreatWizard great point lol. positive was actually part of the original rails number validator (where this library grew from) and taking it out would force me to make a major release.... I just find it easier to just leave it in there for now 😄

GreatWizard commented 7 years ago

I close this PR thanks @offirgolan