Angular ng-messages one among four field is required validation

27 views
Skip to first unread message

selva kumar

unread,
Sep 13, 2015, 3:57:58 AM9/13/15
to AngularJS
I am using ng-messages directive for instant validation in my angular app. I have 2 phone number field and 2 email field. One among these four fields are required to submit the form. How to validate this? These four fields are generated dynamically by clicking on add phone or add email link

Pavel Kuchin

unread,
Sep 18, 2015, 10:36:29 AM9/18/15
to AngularJS
Hi Selva,

I think you can use custom async validation, please check example here: https://docs.angularjs.org/guide/forms (custom async validation)
please let me know if you have any questions.

selva kumar

unread,
Sep 19, 2015, 3:15:59 AM9/19/15
to ang...@googlegroups.com
Hi Pavel,

Thanks for your help. It worked out. 

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/FxTJ9kvOAjQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
Regards
Selvakumar.k

B'lore : 09880492925
Chen  : 09841555263
Reply all
Reply to author
Forward
0 new messages