# Trouble with 'enter valid email

**URL:** https://forum.kirupa.com/t/trouble-with-enter-valid-email/96997
**Category:** Uncategorized
**Created:** [December 16, 2003, 11:26am UTC](https://forum.kirupa.com/t/trouble-with-enter-valid-email/96997 "2003-12-16T11:26:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![urbaneve](https://avatars.discourse-cdn.com/v4/letter/u/839c29/32.png) [@urbaneve](https://forum.kirupa.com/u/urbaneve)
#### Post date: [December 16, 2003, 11:26am UTC](https://forum.kirupa.com/t/trouble-with-enter-valid-email/96997/1 "2003-12-16T11:26:02Z")

</div>

i have looked through the forums and such for a way to verify that that the user has entered the correct format for their email and i am having no luck

all i want is set it so the when the user enters a mistyped email address it kicks it back the to the mail login.

for example:  
[urbaneve@yhaoo.con](mailto:urbaneve@yhaoo.con)

when it should be:  
[urbaneve@yahoo.com](mailto:urbaneve@yahoo.com)

any clues?

this is what i have so far for actionscript (but it doesnt work)  
on (release) {  
if (email.indexOf(" “) != -1 || email.indexOf(”@") == -1 || email.indexOf(".") == -1 ||email.length\<6||email.lastIndexOf(".")\<email.indexOf("@")) {  
gotoAndStop (“wrongemail”);  
} else {  
loadVariablesNum (“consult.php”, 0, “POST”);  
gotoAndStop (“valid”);  
}  
if (name eq “” or email eq “” or subject eq “”) {  
gotoAndStop (“not”);  
} else {  
loadVariablesNum (“consult.php”, 0, “POST”);  
gotoAndStop (“valid”);  
}  
}

even though i tried entering a wrong email address - my form still accepts that it is okay

thanks
