C# Класс 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.

Наследование: Spring.Validation.BaseValidatorGroup
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
ValidateGroup ( object>.IDictionary contextParams, IValidationErrors errors, object validationContext ) : bool

Actual implementation how to validate the specified object.

Описание методов

ExclusiveValidatorGroup() публичный Метод

Initializes a new instance of the ExclusiveValidatorGroup class.
public ExclusiveValidatorGroup ( ) : System.Collections.Generic
Результат System.Collections.Generic

ExclusiveValidatorGroup() публичный Метод

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.
Результат System.Collections.Generic

ExclusiveValidatorGroup() публичный Метод

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.
Результат System.Collections.Generic

ValidateGroup() защищенный Метод

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.
Результат bool