# Check for valid email

**URL:** https://forum.kirupa.com/t/check-for-valid-email/159110
**Category:** Uncategorized
**Created:** [August 14, 2005, 11:13pm UTC](https://forum.kirupa.com/t/check-for-valid-email/159110 "2005-08-14T23:13:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gonzales](https://avatars.discourse-cdn.com/v4/letter/g/ac91a4/32.png) [@gonzales](https://forum.kirupa.com/u/gonzales)
#### Post date: [August 14, 2005, 11:13pm UTC](https://forum.kirupa.com/t/check-for-valid-email/159110/1 "2005-08-14T23:13:26Z")

</div>

really simple question: how do i make sure a user has entered a valid email address. i basically just want to make sure the input field contains an “@” sign. this is the code im using but its not working…

[AS]  
submit.onRelease = function() {  
if (email.indexOf("@") == -1) {  
formStatus.text = “please enter a valid email address”;   
} else {  
formStatus.text = “”;  
trace(“email is valid”);  
}  
};  
[/AS]

ive been searching the forums for about 45 minutes with no luck. i know this is totallly easy but i guess im just missing something…

any clues?

thanks!
