Hi Mahdi, Have a look at custom validators <https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$validators>. Build the ones you need, and use an direcive to hook them up to the right ngModels. The way you are on now, is not one I would like. There is more on validators and forms here <https://docs.angularjs.org/guide/forms#custom%20validation>.
Regards Sander -- 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.
