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
function isValidEmail(address:String)
{
if (address.indexOf("@") < 0) return (false);
return (true);
}
Any help appreciated