I have an input that is optionally disabled. When disabled it still seems to take part in form validation. How can I remove this input from form validation?
<form ng-app name="myForm">
<label>Name</label>
<input type="text" name="name" ng-model="form.name" ng-disabled="show" required>
<input type="submit" ng-disabled="myForm.name.$invalid">
<input type="submit" ng-click="show = !show" value="Toggle">
</form>
Notice on the example that when you hit toggle the input is disabled but the Submit button does not become enabled.