C# Class Spring.Validation.Validators.EmailValidator

Perform email validations.

This implementation is not guaranteed to catch all possible errors in an email address. For example, an address like [email protected] will pass validator, even though there is no TLD "nowhere".

Inheritance: BaseSimpleValidator
Show file Open project: spring-projects/spring-net Class Usage Examples

Public Methods

Method Description
EmailValidator ( ) : System.Text.RegularExpressions

Creates a new instance of the EmailValidator class.

EmailValidator ( IExpression test, IExpression when ) : System.Text.RegularExpressions

Creates a new instance of the EmailValidator class.

EmailValidator ( string test, string when ) : System.Text.RegularExpressions

Creates a new instance of the EmailValidator class.

Protected Methods

Method Description
Validate ( object objectToValidate ) : bool

Validates the supplied objectToValidate.

In the case of the EmailValidator class, the test should be a string variable that will be evaluated and the object obtained as a result of this evaluation will be checked if it is a valid e-mail address.

Method Details

EmailValidator() public method

Creates a new instance of the EmailValidator class.
public EmailValidator ( ) : System.Text.RegularExpressions
return System.Text.RegularExpressions

EmailValidator() public method

Creates a new instance of the EmailValidator class.
public EmailValidator ( IExpression test, IExpression when ) : System.Text.RegularExpressions
test IExpression The expression to validate.
when IExpression The expression that determines if this validator should be evaluated.
return System.Text.RegularExpressions

EmailValidator() public method

Creates a new instance of the EmailValidator class.
public EmailValidator ( string test, string when ) : System.Text.RegularExpressions
test string The expression to validate.
when string The expression that determines if this validator should be evaluated.
return System.Text.RegularExpressions

Validate() protected method

Validates the supplied objectToValidate.
In the case of the EmailValidator class, the test should be a string variable that will be evaluated and the object obtained as a result of this evaluation will be checked if it is a valid e-mail address.
protected Validate ( object objectToValidate ) : bool
objectToValidate object The object to validate.
return bool