Hey there! I'm looking to enhance the validation process for a date input field in a unique manner.
Currently, my default validation setup looks like this:
<div>
<input type="text" name="firstName" ng-model="appointmentForm.firstName" ng-minlength=2 required>
</div>
<div role="alert">
<span class="error" ng-if="submitted && form.firstName.$error.minlength" >
Please enter a valid first name
</span>
</div>
...
Now, I want to implement a validator that checks if the selected date falls between Tuesday and Sunday. Here's an example of what I'm aiming for:
<input type="date" name="date" ng-model="appointmentForm.date" validate-weekday>
Could someone guide me on how to set up this custom validator on the Angular side?