C# Class Spring.Validation.AnyValidatorGroup

IValidator implementation that supports grouping of validators.

This validator will be valid when one or more 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).

Note, that BaseValidatorGroup.FastValidate defaults to true for this validator type!

Inheritance: Spring.Validation.BaseValidatorGroup
Show file Open project: spring-projects/spring-net Class Usage Examples

Public Methods

Method Description
AnyValidatorGroup ( ) : System.Collections.Generic

Initializes a new instance of the AnyValidatorGroup class.

AnyValidatorGroup ( IExpression when ) : System.Collections.Generic

Initializes a new instance of the AnyValidatorGroup class.

AnyValidatorGroup ( string when ) : System.Collections.Generic

Initializes a new instance of the AnyValidatorGroup class.

Protected Methods

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

Validates the specified object.

Method Details

AnyValidatorGroup() public method

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

AnyValidatorGroup() public method

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

AnyValidatorGroup() public method

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

ValidateGroup() protected method

Validates 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