$setValidity not working
<p>I have a condition where if user enters either contact number or email form should be considered as valid, to make this work I tried to use $setValidity but is not working, below is my code:</p>

<pre><code>if($scope.contact.contactNumber || $scope.contact.email) {
    $scope.addContactForm.contactNumber.$setValidity('required', false);
    $scope.addContactForm.email.$setValidity('required', false);

    // In console it will show invalid as true &amp; valid as false
    console.log('Scope:', $scope.addContactForm);
}
</code></pre>