GFXVoid Graphic Design Forum

Remove Text Formatting
Loading...

» Online Users: 8,986

0 members and 8,986 guests
No Members online

» Site Navigation

 > FAQ

» Stats

Members: 35,442
Threads: 103,075
Posts: 826,688
Top Poster: cc.RadillacVIII (7,429)
Welcome to our newest member, Lekelindids
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Location
    Prestonsburg, Kentucky
    Posts
    133

    Default

    Code:
    <!-- Paste this code into an external JavaScript file named: validEmail.js**-->
    
    function Validate_String(string, return_invalid_chars) {
    **valid_chars = '1234567890-_.^~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    **invalid_chars = '';
    **if(string == null || string == '')
    **** return(true);
    
    **//For every character on the string.** 
    **for(index = 0; index < string.length; index++) {
    ****char = string.substr(index, 1);************************
    **** 
    ****//Is it a valid character?
    ****if(valid_chars.indexOf(char) == -1) {
    ******//If not, is it already on the list of invalid characters?
    ******if(invalid_chars.indexOf(char) == -1) {
    ********//If it's not, add it.
    ********if(invalid_chars == '')
    **********invalid_chars += char;
    ********else
    **********invalid_chars += ', ' + char;
    ******}
    ****}
    **}
    ************
    **//If the string does not contain invalid characters, the function will return true.
    **//If it does, it will either return false or a list of the invalid characters used
    **//in the string, depending on the value of the second parameter.
    **if(return_invalid_chars == true && invalid_chars != '') {
    ****last_comma = invalid_chars.lastIndexOf(',');
    ****if(last_comma != -1)
    ******invalid_chars = invalid_chars.substr(0, $last_comma) + 
    ******' and ' + invalid_chars.substr(last_comma + 1, invalid_chars.length);
    ****return(invalid_chars);
    ****}
    **else
    ****return(invalid_chars == ''); 
    }
    
    
    function Validate_Email_Address(email_address) {
    **//Assumes that valid email addresses consist of user_name@domain.tld
    **at = email_address.indexOf('@');
    **dot = email_address.indexOf('.');
    
    **if(at == -1 || 
    ****dot == -1 || 
    ****dot <= at + 1 ||
    ****dot == 0 || 
    ****dot == email_address.length - 1)
    ****return(false);
    **** 
    **user_name = email_address.substr(0, at);
    **domain_name = email_address.substr(at + 1, email_address.length);******************
    
    **if(Validate_String(user_name) === false || 
    ****Validate_String(domain_name) === false)
    ****return(false);******************** 
    
    **return(true);
    }
    
    
    
    
    <!-- Paste this code into the HEAD section of your HTML document.
    **** You may need to change the path of the file.**-->
    
    <script type="text/javascript" src="validEmail.js"></script>
    Nice easy way to validate email with JS.

  2. #2
    Join Date
    Apr 2005
    Posts
    23

    Default

    Whoa That code is hard to translate XD
    but im sure going to try it !
    thanks!

  3. #3

    Default

    Oh wow, i thought somebody had made a tutorial for how to validate your account with like screenshots of how to open up your email and stuff like that.

Similar Threads

  1. Please help in E-mail link problems....
    By Xokira in forum The Void
    Replies: 6
    Last Post: 06-30-2006, 12:43 AM
  2. 30 gig mail storage
    By Virulent in forum The Void
    Replies: 1
    Last Post: 04-05-2006, 05:37 AM
  3. E-mail Time Capsule
    By Runch in forum The Void
    Replies: 11
    Last Post: 11-25-2005, 04:10 PM
  4. Anyone wanna have G-Mail
    By Quickdust in forum The Void
    Replies: 25
    Last Post: 06-14-2005, 08:35 AM
  5. Clickable Sig with mail
    By 1337elite in forum Sigs & Manips
    Replies: 5
    Last Post: 05-08-2005, 06:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1