Jquery email validation
<p>I am using this code for email validation:</p>

<pre><code>function validateEmail(){
    //testing regular expression
    var a = $("#email").val();
            $.ajax({
              type: "GET",
              url: "is_email.php",
              data: "email="+a,
              success: function(response){
                //if it's valid email
        if(is_email(a)){
        email.removeClass("error");
        emailInfo.text("");
        emailInfo.removeClass("error");
        return true;

                //if it's NOT valid
        }else{
        email.addClass("error");
        emailInfo.text("Please type a valid E-mail");
        emailInfo.addClass("error");
        return false;
        }
              }
            });
}
</code></pre>

<p>But I get this error in firebug: is_email is not defined.</p>

<p>How can I correct this?</p>

<p>Thank you</p>
