C# Class Spring.Validation.ExclusiveValidatorGroup

IValidator implementation that supports grouping of validators.

This validator will be valid when one and only one of the validators in the Validators collection are valid

ValidationErrors property will return a union of all validation error messages for the contained validators, but only if this validator is not valid (meaning, when none of the contained validators are valid).

By default, this validator group uses BaseValidatorGroup.FastValidate == true semantics.

Inheritance: Spring.Validation.BaseValidatorGroup
Afficher le fichier Open project: spring-projects/spring-net Class Usage Examples

Méthodes publiques

Méthode Description
ExclusiveValidatorGroup ( ) : System.Collections.Generic

Initializes a new instance of the ExclusiveValidatorGroup class.

ExclusiveValidatorGroup ( IExpression when ) : System.Collections.Generic

Initializes a new instance of the ExclusiveValidatorGroup class.

ExclusiveValidatorGroup ( string when ) : System.Collections.Generic

Initializes a new instance of the ExclusiveValidatorGroup class.

Méthodes protégées

Méthode Description
ValidateGroup ( object>.IDictionary contextParams, IValidationErrors errors, object validationContext ) : bool

Actual implementation how to validate the specified object.

Method Details

ExclusiveValidatorGroup() public méthode

Initializes a new instance of the ExclusiveValidatorGroup class.
public ExclusiveValidatorGroup ( ) : System.Collections.Generic
Résultat System.Collections.Generic

ExclusiveValidatorGroup() public méthode

Initializes a new instance of the ExclusiveValidatorGroup class.
public ExclusiveValidatorGroup ( IExpression when ) : System.Collections.Generic
when IExpression The expression that determines if this validator should be evaluated.
Résultat System.Collections.Generic

ExclusiveValidatorGroup() public méthode

Initializes a new instance of the ExclusiveValidatorGroup class.
public ExclusiveValidatorGroup ( string when ) : System.Collections.Generic
when string The expression that determines if this validator should be evaluated.
Résultat System.Collections.Generic

ValidateGroup() protected méthode

Actual implementation how to validate the specified object.
protected ValidateGroup ( object>.IDictionary contextParams, IValidationErrors errors, object validationContext ) : bool
contextParams object>.IDictionary Additional context parameters.
errors IValidationErrors instance to add error messages to.
validationContext object The object to validate.
Résultat bool