How can I combine these two regex patterns for an AngularJS form field?
\d{4}([- ]*)\d{6,7}
OR
[a-zA-Z0-9]{4,12}
I attempted to do this like so:
<input type="text" pattern="\d{4}([- ]*)\d{6,7} | [a-zA-Z0-9]{4,12}" class="form-control" ng-model="formData.username" required placeholder="username">