Register  |  Login



Question

Status: Closed Points: 60 Time: 16:57 - Sep 16, 2006  

david

Validating email address in javascript?

How do I validate an email address in javascript?
I suppose I should use regular expressions, but I don´t know how to write it.

Answer Discussion
Answer Summaries

 

Q&A System for Websites and Corporate Collaboration

Advertisement

  • Generates significant organic traffic for websites
  • Saves companies money, resources, and time

jgivoni

Date:: Sep 16, 2006

Time:: 17:58

David, I use this function:

function validateEmail(email)
{
 var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\
".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA
-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
 return email.match(re)
}

Takes the email address and returns true or false.

david

Date:: Sep 16, 2006

Time:: 18:03

Thanks, Jakob.
Funny enough I found the exact same one when I was searching on google.
But you'll get the points anyway :)

Question Answered

This question has been closed, and points have been rewarded to the following experts:

jgivoni: 60

You're welcome however to comment or give additional information or if you wish, you have the ability to write an Answer Summary for the Summary Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

No summaries have been submitted yet. Want to be the first?

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Similar Questions

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top email Experts

View More

Rank

Expert

Points

1.

nidhi

475

2.

rcastagna

262

3.

PeterNZ

185

4.

oracleofDelphi

162

5.

jgivoni

160

6.

xarcus

75

7.

Dngrsone

35

8.

multani.sarbjit

25

9.

ozzie

25

10.

redcharcoal

25

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es