Class FluentValidatorCollection<T>
Defines a list of
Inheritance
Namespace: MADE.Data.Validation
Assembly: MADE.Data.Validation.FluentValidation.dll
Syntax
public class FluentValidatorCollection<T> : List<IValidator<T>>, IValidatorCollection
Type Parameters
Name | Description |
---|---|
T | The type of item being validated. |
Constructors
| Improve this Doc View SourceFluentValidatorCollection()
Initializes a new instance of the FluentValidatorCollection<T> class that is empty and has the default initial capacity.
Declaration
public FluentValidatorCollection()
FluentValidatorCollection(IEnumerable<IValidator<T>>)
Initializes a new instance of the FluentValidatorCollection<T> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
Declaration
public FluentValidatorCollection(IEnumerable<IValidator<T>> collection)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<MADE.Data.Validation.IValidator<T>> | collection | The collection whose elements are copied to the new list. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
FluentValidatorCollection(Int32)
Initializes a new instance of the FluentValidatorCollection<T> class that is empty and has the specified initial capacity.
Declaration
public FluentValidatorCollection(int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The number of elements that the new list can initially store. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
Properties
| Improve this Doc View SourceFeedbackMessages
Gets the validator feedback messages for ones which are invalid.
Declaration
public IEnumerable<string> FeedbackMessages { get; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
IsDirty
Gets or sets a value indicating whether the data is dirty.
Declaration
public bool IsDirty { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInvalid
Gets or sets a value indicating whether the data provided is in an invalid state.
Declaration
public bool IsInvalid { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceValidate(Object)
Executes data validation on the provided value
against the validators provided.
Declaration
public void Validate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be validated. |
Events
| Improve this Doc View SourceValidated
Occurs when the input value is validated against the collection of validators.
Declaration
public event InputValidatedEventHandler Validated
Event Type
Type | Description |
---|---|
InputValidatedEventHandler |