SPList.ValidationMessage property
取得或設定驗證失敗的清單項目時顯示訊息。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Property ValidationMessage As String
Get
Set
'用途
Dim instance As SPList
Dim value As String
value = instance.ValidationMessage
instance.ValidationMessage = value
public string ValidationMessage { get; set; }
Property value
Type: System.String
訊息的文字。
Exceptions
Exception | Condition |
---|---|
ArgumentException | 字串過長。驗證訊息字串的最大長度為 1024年。 |
備註
新增或更新清單項目時,每次ValidationFormula屬性中所含的驗證公式會求值。如果驗證失敗時,會顯示ValidationMessage屬性中的郵件。