guillaumepotier / validator.js

Powerful objects and strings validation in javascript for Node and the browser
http://validatorjs.org
MIT License
255 stars 39 forks source link

Simplify Required assert #58

Closed franciscocardoso closed 8 years ago

franciscocardoso commented 8 years ago

This commit updates the Required assert to check only if the property is defined.

Refs https://github.com/guillaumepotier/validator.js/issues/29.

fixe commented 8 years ago

pinging @guillaumepotier

guillaumepotier commented 8 years ago

Yes sorry, this is going too fast for me these days --'

You're right in #29, these unnecessary checks had been made for Parsley.js initially when they where tightly coupled.

I think this change is a good thing, do not need to mix too many concerns in the Required assert. Ok for that, but maybe we could write it in the changelog and make a more important version bump since it is BC break.

2.1.0 should be ok IMO. Need to update it in package.json, Readme, build dist version, etc.. I'd like to just have to tag and npm publish (or only npm publish if you have the tagging rights)

Best