# Validating email addresses

**URL:** <https://forum.kirupa.com/t/validating-email-addresses/296969>\
**Category:** flash\
**Created:** [September 23, 2009, 3:04pm UTC](https://forum.kirupa.com/t/validating-email-addresses/296969 "2009-09-23T15:04:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbaker](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@jimbaker](https://forum.kirupa.com/u/jimbaker)\
**Post date:** [September 23, 2009, 3:04pm UTC](https://forum.kirupa.com/t/validating-email-addresses/296969/1 "2009-09-23T15:04:05Z")

</div>

I am trying to improve a piece of code written by a friend. I have an appication where two of the input text fields are email addresses. The code only looks for the @ sign and if it’s there assumes it’s a good address. I need it to also check for a period and try as I might I can’t get it to work properly. If anyone has some thoughts could you tell me how to modify this code to check for both

```auto
function isValidEmail(address:String) 
{
  if (address.indexOf("@") < 0) return (false);
    return (true);
}

```

Any help appreciated
