获取或设置列表项验证失败时显示的消息。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
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; }
属性值
类型:System.String
消息的文本。
异常
| 异常 | 条件 |
|---|---|
| ArgumentException | 该字符串是太长。验证消息字符串的最大长度为 1024年。 |
备注
每次,添加或更新列表项包含在ValidationFormula属性中验证公式进行求值。如果验证失败,则ValidationMessage属性中将显示消息。