Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Validator.StringLength Method

Defines a validation test that tests the length of a string.

Namespace:  System.Web.WebPages
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)
public static function StringLength(
	maxLength : int, 
	minLength : int, 
	errorMessage : String
) : IValidator

Parameters

maxLength
Type: System.Int32
The maximum length of the string.
minLength
Type: System.Int32
The minimum length of the string. The default is 0.
errorMessage
Type: System.String
The error message to display if validation fails.

Return Value

Type: System.Web.WebPages.IValidator
The validation test.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.