I have an input field, "Size", which can accept values like (21 x 12, 12"4' x 21" 12'
). How can I control the input field in HTML in such a way that it allows the user to only enter Numbers and (X,',"")
, and restrict other characters and alphabets? I have used AngularJS as vm Controller
<div class="clearfix">
<div class="col-xs-4 pad-0">
<label>Size</label>
</div>
<div class="col-xs-8 pad-col-7">
<div class="form-group ">
<md-input-container class="block typefield">
<input type="number" ng-model="vm.MappedMediaLineItem.UnitSize">
</md-input-container>
</div>
</div>
</div>
Right Now I am using type as Number but it dosen't allow me to enter X,',""