Thanks for the reply Sanders. Yes I saw some sample code which can do add/remove validators dynamically but can it derive it basis the country configuration that is maintained in the database table I mentioned in my question. If possible kindly provide sample/psuedo code for the same.
For eg: I have following configuration in database table - Country Field Mandatory Min Length Max Length ====== ==== ======== ======== ========= IN State N 0 50 US State Y 1 50 IN City Y 1 50 So when US country is selected, I should attach the Required and Length validators to State but remove the required validator when IN is selected. On Wednesday, 29 November 2017 13:51:57 UTC+5:30, Sander Elias wrote: > > You can add/remove validators dynamically during run time without issues -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.