Tuesday, February 14, 2017

Validate Emailid Using Regex Javascript

Validate email id with regex expression.

if(email!='') {
             var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
             if( !emailReg.test( email ) ) {
                    alert('Please enter valid email');
                    $("#email").focus();
                    return false;
                   
               }
            }

What is scope in Angular Js

Angular Js Scope The scope is the binding part between the HTML (view) and the JavaScript (controller). The scope is an object with th...