netceteragroup / valdr

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

Problem with setConstraintUrl and custom validation #85

Open imamovic opened 9 years ago

imamovic commented 9 years ago

If json with validation is loaded from server you can not setup custom validation for same valdr-type. Custom validation is deleted with validation from server.

Problem is with this:

var addConstraints = function (newConstraints) {
      angular.extend(constraints, newConstraints);
 };

Need to be user angular.merge();

marcelstoer commented 9 years ago

Why do you have tighter validation on the client than on the server (I understand that's what you're doing)? It should be the other way around.

imamovic commented 9 years ago

Not exactly, there is and validation on server but it is not been validation, it is custom validation (because of step when data are validated)