I have a text box and Search Button in UI. I want to validate it like only Numbers should be entered on button click.
I didn't use it in Form(I got to know lot of ways to validate form control). But simply i've designed it(independent) in my div.
So can you pls guide me to validate my control in Angular.
<div id="srchbox">
<p id="ptext">Please enter the Movie Id</p>
<input type="text" class="form-control" placeholder="Search" id="Srchtxt" ng-model="_Id">
<button type="submit" class="btn btn-default" id="btnsrch" ng-click="search(_Id)"><span class="glyphicon glyphicon-search"></span></button>
</div>