Field.Required property
Gets or sets a value that specifies whether the field requires a value.
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Property Required As Boolean
Get
Set
'Usage
Dim instance As Field
Dim value As Boolean
value = instance.Required
instance.Required = value
public bool Required { get; set; }
Property value
Type: System.Boolean
Returns Booleantrue if the field requires a value; otherwise, returns false.
Exceptions
Exception | Condition |
---|---|
[System.NotSupportedException] | Value is set to true, and the list is an external list. Error code: -1. |
Remarks
If the field requires a value, this value must be set to true. Otherwise, it must be set to false.