Belešku
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da se prijavite ili da promenite direktorijume.
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da promenite direktorijume.
The ValidateLength attribute specifies the minimum and maximum number of characters for a cmdlet parameter argument. This attribute can also be used by Windows PowerShell functions.
Syntax
[ValidateLength(int minLength, int maxlength)]
Parameters
MinLength (System.Int32)
Required. Specifies the minimum number of characters allowed.
MaxLength (System.Int32)
Required. Specifies the maximum number of characters allowed.
Remarks
For more information about how to declare this attribute, see How to Declare Input Validation Rules.
When this attribute is not used, the corresponding parameter argument can be of any length.
The Windows PowerShell runtime throws an error under the following conditions:
When the value of the
MaxLengthattribute parameter is less than the value of theMinLengthattribute parameter.When the
MaxLengthattribute parameter is set to 0.When the argument is not a string.
The ValidateLength attribute is defined by the System.Management.Automation.ValidateLengthAttribute class.