Email Validation

6 02 2008

Here is a base email validation class for AS2

function validateEmail(emailStr:String) {
var errorCount:Number = 0;
//check to see if there are at least two chars be for the @ symbol
if (emailStr.indexOf(“@”)<2) {
//check that the @ is not within 2 chars of .
if (emailStr.lastIndexOf(“.”)<=(emailStr.lastIndexOf(“@”)+2)) {
//check length eg min
if (emailStr.length<8) {
//check there is only one @
if (emailStr.indexOf(“@”) != emailStr.lastIndexOf(“@”)) {
// return a T/F to the flash file
if (errorCount == 0) {
return true;
} else {
return false;

//to use it
trace(“EMAIL VALID”);

A Sweet idea to help out guys with Valentine’s Day.

4 02 2008

Haha if you cant find anything for your girl friend try this.

This is meant to be a secret, or at least a secret for guys only. A retailer in New Zealand is pulling a Valentine’s Day Stunt that all guys can get in on.

I thought it was kinda a sweet idea.

read more | digg story

New! Get FREE breakthrough broadband with Google TiSP (BETA).

1 04 2007

P.S Check todays date