Validates Email address.
Default use a simple string validation ( '@' place, char length and more ).
You can use more precise validation process using the strategy property.
Note : If EmailValidatorStrategy is used, all others tests are ignored.
All strategy classes must implement EmailValidatorStrategy interface.
Example
public function ValidationTest5() { var email : String = "myname@myDo"; var validator : EmailValidator = new EmailValidator(); validator.strategy = new RegExpStategy(); var result : ValidationResultEvent = validator.validate(email); if(result.type == ValidationResultEvent.INVALID) { Logger.LOG(result.message, LogLevel.WARN, FeverDebug.channel); } else { Logger.LOG("Nice !", LogLevel.WARN, FeverDebug.channel); } }
public strategy:EmailValidatorStrategy null ).