Question: I need help with my javascript code to validate email input on my form please. My HTML form: E-mail: Submit Clear Heres the javascript code

I need help with my javascript code to validate email input on my form please.

My HTML form:

Heres the javascript code I have so far:

//validate e-mail function validEmail(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 re.test(email);}

Please make sure it is validated with javascript code and not done with HTML. Thanks!

1) Pass it a string that may or may not contain a valid email address,and it will return true (it is an email) or false (it is not an email).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!