So I have this form that has an id input field. I want to restrict it to alpha numeric with no spaces so I set this up:
self.pattern = /^[a-z0-9]*$/;
Which is used in my view like this:
<input class="form-control" name="id" type="text" ng-model="controller.model.id" ng-disabled="controller.id" ng-pattern="/^[a-z0-9]*$/" ng-trim="" ng-maxlength="10" required />
But I want to modify my pattern to say that there must be at least 1 letter, but it can have 0 digits. Can someone let me know how to do this?
^[a-z0-9]*[a-z][a-z0-9]*$ng-pattern="/^\d*[a-z][a-z\d]*$/", addimodifier if you need to also match uppercase letters