netceteragroup / valdr

A model centric approach to AngularJS form validation
http://netceteragroup.github.io/valdr/
MIT License
153 stars 43 forks source link

minLength #99

Closed meta-akshat-mathur closed 8 years ago

meta-akshat-mathur commented 8 years ago

When i apply minLength constraint on a field then field becomes required.

marcelstoer commented 8 years ago

Common wisdom AFAIK is that null values are considered valid. Hence, the last two tests in https://github.com/netceteragroup/valdr/blob/master/src/core/validators/minLengthValidator.spec.js#L73 seem wrong.

https://docs.oracle.com/javaee/7/api/javax/validation/constraints/Min.html for example states that

null elements are considered valid.

@philippd do you agree?

meta-akshat-mathur commented 8 years ago

Issue arise when you entered a value in a field then delete it, but still it gives a error message for the min length is required

marcelstoer commented 8 years ago

Fixed with #107.