Email Validation Using AngularJS


A Validation used to validate the data of an input control. If the data does not pass validation, it will display an error message to the user.

There are so many types of validation in AngularJS like Required Field, Minimum Length, Maximum Length, Pattern etc.

How To Validate Email Using AngularJS

1. Download angular.min.js file from AngularJS
2. Now use following code for Email Validation.

<!doctype html>

<html ng-app>
    <script src="angular.min.js"></script>

        function Ctrl($scope) {

            $scope.text = '';


    <form name="myForm" ng-controller="Ctrl">
    <input type="email" name="input" ng-model="text" required>
    <span class="error" ng-show="myForm.input.$error.required">Required!</span> <span
        class="error" ng-show="myForm.input.$">Not valid email!</span> <tt>{{text}}</tt><br />



  1. When page will be load

    page load

  2. When TextBox will be Empty then.

    Images Empty TextBox

  3. When Email address will not be correct.

    Images/Email address incorrect

  4. When right Email Address will be enter.

    Email address correct