Compartilhar via


ValidateLengthAttribute Class

Definition

Validates that the length of each parameter argument's Length falls in the range specified by MinLength and MaxLength.

public ref class ValidateLengthAttribute sealed : System::Management::Automation::ValidateEnumeratedArgumentsAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class ValidateLengthAttribute : System.Management.Automation.ValidateEnumeratedArgumentsAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type ValidateLengthAttribute = class
    inherit ValidateEnumeratedArgumentsAttribute
Public NotInheritable Class ValidateLengthAttribute
Inherits ValidateEnumeratedArgumentsAttribute
Inheritance
Attributes

Constructors

ValidateLengthAttribute(Int32, Int32)

Initializes a new instance of the ValidateLengthAttribute class.

Properties

MaxLength

Gets the attribute's maximum length.

MinLength

Gets the attribute's minimum length.

Methods

Validate(Object, EngineIntrinsics)

Calls ValidateElement in each element in the enumeration argument value.

(Inherited from ValidateEnumeratedArgumentsAttribute)
ValidateElement(Object)

Abstract method to be overridden by subclasses, implementing the validation of each parameter argument.

(Inherited from ValidateEnumeratedArgumentsAttribute)

Applies to