Hi, one solution could be this: http://netceteragroup.github.io/valdr/ The idea is to define a json that describe validation rules and error messages, and then apply those rules to your input. Also, if you want your validation rules comes from the server, you can generate the json on server side.
As a benefit, if you are using Java for the backend, and you are using the Java Bean Validation, you can use https://github.com/netceteragroup/valdr-bean-validation. It generate for you the json based on Java Bean Validation annotation. 2015-11-19 10:41 GMT+01:00 goniaks <[email protected]>: > Hi, > > > I want to make custom control that get the validation rules from the > server, > > and display the errors to the client, in order to re-use it. > > the ng-messages isn't working inside the custom directive. > > this is full demo: > > > http://plnkr.co/edit/X47nj0tcAIMonguc8j1a?p=info > > > > Regards, > > Gonen. > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
