I am using angular form validation like this:
<input type="text" class="form-control" id="Name" ng-model="name" ng-required="true" name="name" ng-class="{true: 'error'}[validationForm.name.$invalid]" ng-model-options="{ updateOn: 'blur' }">
<p ng-show="validationForm.name.$error.required && validationForm.name.$dirty">
Name is required.
</p>
A lot of the HTML Code is used only for the validation - 4 attributes in the input element. Is it possible to set only 1 attribute for "custom validation" and implement the other stuff in my JavaScript code? I think that would result in cleaner code and save a lot of time if I have ~20 inputs.