Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check email id valid or not without using regex in javascript

function ValidateEmailAddress(emailString) {
    // check for @ sign
    var atSymbol = emailString.indexOf("@");
    if(atSymbol < 1) return false;
    
    var dot = emailString.indexOf(".");
    if(dot <= atSymbol + 2) return false;
    
    // check that the dot is not at the end
    if (dot === emailString.length - 1) return false;
    
    return true;
}
Source by qawithexperts.com #
 
PREVIOUS NEXT
Tagged: #check #email #id #valid #regex #javascript
ADD COMMENT
Topic
Name
3+8 =