validate natural input number with ngpattern

The problem is that your REGX pattern will only match the input “0-9”. To meet your requirement (0-9999999), you should rewrite your regx pattern: ng-pattern=”/^[0-9]{1,7}$/” My example: HTML: <div ng-app ng-controller=”formCtrl”> <form name=”myForm” ng-submit=”onSubmit()”> <input type=”number” ng-model=”price” name=”price_field” ng-pattern=”/^[0-9]{1,7}$/” required> <span ng-show=”myForm.price_field.$error.pattern”>Not a valid number!</span> <span ng-show=”myForm.price_field.$error.required”>This field is required!</span> <input type=”submit” value=”submit”/> </form> </div> … Read more

AngularJS Dropdown required validation

You need to add a name attribute to your dropdown list, then you need to add a required attribute, and then you can reference the error using myForm.[input name].$error.required: HTML: <form name=”myForm” ng-controller=”Ctrl” ng-submit=”save(myForm)” novalidate> <input type=”text” name=”txtServiceName” ng-model=”ServiceName” required> <span ng-show=”myForm.txtServiceName.$error.required”>Enter Service Name</span> <br/> <select name=”service_id” class=”Sitedropdown” style=”width: 220px;” ng-model=”ServiceID” ng-options=”service.ServiceID as service.ServiceName for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)