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
Afficher le fichier Open project: spring-projects/spring-net Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

EmailValidator() public méthode

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.
Résultat System.Text.RegularExpressions

EmailValidator() public méthode

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.
Résultat System.Text.RegularExpressions

Validate() protected méthode

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.
Résultat bool