Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets a value that indicates whether certain field properties are enforced when an item is added or updated.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration
Public Property EnforceDataValidation As Boolean
Get
Set
'Usage
Dim instance As SPList
Dim value As Boolean
value = instance.EnforceDataValidation
instance.EnforceDataValidation = value
public bool EnforceDataValidation { get; set; }
Type: System.Boolean
true to enforce field properties; otherwise, false.
If the value of the EnforceDataValidation property is true, then the following conditions must be met:
If the Required property of any field in the item is set to true, then the field must have a value.
If an SPFieldNumber object in the item has values in the MinimumValue and MaximumValue properties, then the field value must be within the specified bounds.
If an SPFieldChoice object in the item has the FillInChoice property set to true, then the field value must be one of the strings in the field's Choices collection.
If any one of these conditions is not met, then an SPListDataValidationException is thrown.
Note
The type of validation controlled by this property is independent of validation that uses the formula set in the ValidationFormula property.
Please sign in to use this experience.
Sign in