SPField.Required property

Gets or sets a Boolean value that determines whether users must enter a value for the field on New and Edit forms.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

public bool Required { get; set; }

Property value

Type: System.Boolean
true if the field requires values; otherwise, false.

Exceptions

Exception Condition
NotSupportedException

The list that the field belongs to is an external list.

See also

Reference

SPField class

SPField members

Microsoft.SharePoint namespace