If a user enters something other than a number in the field (like "five hundred" or "9987-"), Angular does not treat it as an error and no error is displayed (the ng-class remains unchanged in this scenario).
<div class="form-group"
ng-class="{ 'has-error' : submitted && form.price.$error.pattern }">
<input name="price" id="price" type="number"
ng-model="formOb.price"
ng-pattern="/^[0-9]+([\.|,][0-9]+)?$/"
/>
Is there a way to address this issue? How can the class be changed to 'has-error'? (preferably without using direct JavaScript)