Email validation

The email validation directive validates email addresses in input fields.

Email validation settings

  • ng-model — Specifies an object to bind the email address value to on the input field.
  • type="email" — Indicates that email validation can be used.



<div ng-controller="ValidationTestController as validationCtrl">
    <div class="row">
        <div class="col-md-12">
            <div class="tile-form">
                <form name="validationCtrl.validationTest">
                    <div class="form-group">
                        <div class="input-group">
                            <label for="testField1">Email address </label>
                            <input class="form-control" type="email" name="testField1" ng-model="" bb-email-validation />
                            <label class="error" ng-show="validationCtrl.validationTest.testField1.$dirty && validationCtrl.validationTest.testField1.$">
                            Invalid email address format!



/*global angular */
(function () {
    'use strict';

    function ValidationTestController() {
        var self = this; = '';

    angular.module('stache').controller('ValidationTestController', ValidationTestController);