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
Show file Open project: spring-projects/spring-net Class Usage Examples

Public Methods

Method 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.

Protected Methods

Method Description
ValidateGroup ( object>.IDictionary contextParams, IValidationErrors errors, object validationContext ) : bool

Actual implementation how to validate the specified object.

Method Details

ExclusiveValidatorGroup() public method

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

ExclusiveValidatorGroup() public method

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.
return System.Collections.Generic

ExclusiveValidatorGroup() public method

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.
return System.Collections.Generic

ValidateGroup() protected method

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.
return bool