次の方法で共有


Validator.StringLength(Int32, Int32, String) メソッド

定義

文字列の長さをテストする検証テストを定義します。

public static System.Web.WebPages.IValidator StringLength(int maxLength, int minLength = 0, string errorMessage = default);
static member StringLength : int * int * string -> System.Web.WebPages.IValidator
Public Shared Function StringLength (maxLength As Integer, Optional minLength As Integer = 0, Optional errorMessage As String = null) As IValidator

パラメーター

maxLength
Int32

文字列の最大長。

minLength
Int32

文字列の最小長。 既定値は 0 です。

errorMessage
String

検証が失敗した場合に表示するエラー メッセージ。

戻り値

検証テスト。

適用対象