I creating Contact us form and i want in email section that if email entered wrong way (not name@example.com), user wouldn't be able to submit form.
input:
<input name="email" type="text" value="" size="30"/>
I creating Contact us form and i want in email section that if email entered wrong way (not name@example.com), user wouldn't be able to submit form.
input:
<input name="email" type="text" value="" size="30"/>
With regexp using javascript/php (or whatever) you would be able to validate an email format : presence of "@", presence of ".dom", but you will have to hard code to avoid something like "example.com".
I would suggest to use a validation/activation mechanism : send an email with a link, when user click the link you receive a notification, that means that email is valid so you can take care of it !
You can check this topic : Validate email address in JavaScript? But it does not take care about something like "name@example.com". As Mike W said in comments, the only way to validate a valid email is to send an email.
Also, you could have fun trying to trap auto-response for invalid email by checking the sender mailbox ;)