How can I check if a given input control is empty? I know there is $pristine property on the field which tells that if a given field is empty initially but what
$pristine
If your textbox is a Required field and have some regex pattern to match and has minlength and maxlength
TestBox code
Ng-Class to Add
ng-class="{ 'err' : myform.myfieldname.$invalid || (myform.myfieldname.$touched && !model.myfieldmodel.length) }"