Home

Castle Stronghold

ValidateLengthAttribute API Document

Validate that this property has the required length (either exact or in range)

Constructors

ValidateLengthAttribute(Int32 exactLength)

Initializes a new exact length validator.

ParameterDescription
exactLength The exact length required.

ValidateLengthAttribute(Int32 exactLength, String errorMessage)

Initializes a new exact length validator.

ParameterDescription
exactLength The exact length required.
errorMessage The error message to be displayed if the validation fails.

ValidateLengthAttribute(Int32 minLength, Int32 maxLength)

Initializes a new range based length validator.

ParameterDescription
minLength The minimum length, or int.MinValue if this should not be tested.
maxLength The maximum length, or int.MaxValue if this should not be tested.

ValidateLengthAttribute(Int32 minLength, Int32 maxLength, String errorMessage)

Initializes a new range based length validator.

ParameterDescription
minLength The minimum length, or int.MinValue if this should not be tested.
maxLength The maximum length, or int.MaxValue if this should not be tested.
errorMessage The error message to be displayed if the validation fails.

Properties

NameTypeDescription
ValidatorIValidator Gets the validator for this attribute. Each attribute that inherits from this class will have its own validtor.

Google
Search WWW Search castleproject.org