Class MaxLengthValidator
Defines a data validator for ensuring a value is less than a maximum length.
Inheritance
System.Object
MaxLengthValidator
Implements
Namespace: MADE.Data.Validation.Validators
Assembly: MADE.Data.Validation.dll
Syntax
public class MaxLengthValidator : object, IValidator
Constructors
| Improve this Doc View SourceMaxLengthValidator()
Initializes a new instance of the MaxLengthValidator class.
Declaration
public MaxLengthValidator()
MaxLengthValidator(IComparable)
Initializes a new instance of the MaxLengthValidator class with a maximum value.
Declaration
public MaxLengthValidator(IComparable max)
Parameters
Type | Name | Description |
---|---|---|
IComparable | max | The maximum value. |
Properties
| Improve this Doc View SourceFeedbackMessage
Gets or sets the feedback message to display when IsInvalid is true.
Declaration
public string FeedbackMessage { get; set; }
Property Value
Type | Description |
---|---|
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 |
Key
Gets or sets the key associated with the validator.
Declaration
public string Key { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Max
Gets or sets the maximum value.
Declaration
public IComparable Max { get; set; }
Property Value
Type | Description |
---|---|
IComparable |
Methods
| Improve this Doc View SourceValidate(Object)
Executes data validation on the provided value
.
Declaration
public void Validate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be validated. |