Hi..
I used following regular expression "/^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/" for email validation.
It won't check the mail id like "testmail@gmail" .
It will work "testmail@gmai"

Can anybody suggest solution for this?

The regex you show is used to validate a date.

How complex do you want the email validation? It gets ugly real quick. Here's one of the simpler ones:

/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,6}$/i
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.