Angular directives for conditional required

The Problem Angular does support the concept of conditional required through the built-in directive ng-required. And it works great in simple scenarios. Consider the following example where address2 is only required when address1 is not empty. Address1 : <input name="address1" type="text" ng-model="address1" /> Address2 : <input name="address2" type="text" ng-model="address2" ng-required="!address1" /> This can be done using ng-required as shown above. But what if we also want address2 to be 'not required' when address1 is empty? [Read More]