Search Results

Search found 1 results on 1 pages for 'rdesai'.

Page 1/1 | 1 

  • how to remove error text from the email format checker code?

    - by rdesai
    I have been writing a code for validating forms using javascript/jquery. Following is a code snippet for checking email format. The problem is when I enter invalid email, it recognizes it, but when I go back to this field and enter correct email, the error text still stays even though I have used the 'else' part. How do I remove the error text in this case? if(e1.value!=''){ var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i; if (document.signupForm.email1.value.search(emailRegEx) == -1) { $("#err_email1").html("Please enter valid email address."); } status=0; } else{ $("#err_email1").html(""); status=1; }

    Read the article

1