How to validate email id in angularJs using ng-pattern

If you want to validate email then use input with type=”email” instead of type=”text”. AngularJS has email validation out of the box, so no need to use ng-pattern for this. Here is the example from original documentation: <script> function Ctrl($scope) { $scope.text=”[email protected]”; } </script> <form name=”myForm” ng-controller=”Ctrl”> Email: <input type=”email” name=”input” ng-model=”text” required> <br/> <span … Read more