Class ValidatorCollection
Defines a list of IValidator objects that can be accessed by index.
Inheritance
Namespace: MADE.Data.Validation
Assembly: MADE.Data.Validation.dll
Syntax
public class ValidatorCollection : List<IValidator>, IValidatorCollection
Constructors
| Improve this Doc View SourceValidatorCollection()
Initializes a new instance of the ValidatorCollection class that is empty and has the default initial capacity.
Declaration
public ValidatorCollection()
ValidatorCollection(IEnumerable<IValidator>)
Initializes a new instance of the ValidatorCollection class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
Declaration
public ValidatorCollection(IEnumerable<IValidator> collection)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IValidator> | collection | The collection whose elements are copied to the new list. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ValidatorCollection(Int32)
Initializes a new instance of the ValidatorCollection class that is empty and has the specified initial capacity.
Declaration
public ValidatorCollection(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 |