Closed Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14

Thread: help with email validation

  1. #11
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    I'm not aware of using / instead of " in that way.

    I would try running your page in FireFox and check the Error Console for JS errors. There must be something happening with it.

    I tested the code I posted and it worked fine for me.

  2. #12
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    Thanks RR...but I don't have FireFox, only IE.

    I found out the following link and for some reason this one works with the " but like this: Validate email adresses using regular expressions
    weird...lol.

    Code:
    var emailExp = new RegExp("^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$");
    
    This is the site where I got the original line: Javascript Tutorial - Form

  3. #13
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    Quote Originally Posted by Rebelle View Post
    Thanks RR...but I don't have FireFox, only IE.

    I found out the following link and for some reason this one works with the " but like this: Validate email adresses using regular expressions
    weird...lol.

    Code:
    var emailExp = new RegExp("^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$");
    
    This is the site where I got the original line: Javascript Tutorial - Form
    So, is it working now then?

  4. #14
    Barn Legend Rebelle will become famous soon enough Rebelle's Avatar
    Join Date
    Mar 2008
    Posts
    1,522
    Rep Power
    5

    yep...seems to work with the line in above post.

    when i leave EQ empty, i get prompt...yay!
    when i leave EQdesc empty, i get prompt...yay!
    when i leave email empty, i get prompt...yay!
    when i enter rebelle in email, i get prompt...yay!
    when i enter rebelle@nothing, i get prompt...yay!
    when i enter rebelle@yahoo.com, i get to prompt and no errors!! yay! yay!

    w00t!

Closed Thread
Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Programmatically Add Item to Validation Summary
    By jmurrayhead in forum .NET Code Samples
    Replies: 3
    Last Post: January 18th, 2011, 01:25 PM
  2. validation
    By todd2006 in forum JavaScript Programming
    Replies: 5
    Last Post: July 30th, 2008, 10:23 AM
  3. date validation
    By todd2006 in forum JavaScript Programming
    Replies: 3
    Last Post: July 6th, 2008, 12:39 PM
  4. textbox validation
    By todd2006 in forum JavaScript Programming
    Replies: 6
    Last Post: July 2nd, 2008, 02:30 PM
  5. checkbox validation
    By todd2006 in forum JavaScript Programming
    Replies: 3
    Last Post: June 18th, 2008, 08:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO