This documentation is archived and is not being maintained.

WebPart.ShouldValidate Property

Windows SharePoint Services 3

Gets a value indicating whether the Web Part infrastructure should perform data validation of Web Part properties before setting them.

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

protected internal bool ShouldValidate { get; }

Property Value

Type: System.Boolean
true if the Web Part properties need to be validated; otherwise, false.

The value of the ShouldValidate property is always true unless the Web Part's properties are being deserialized with the data retrieved from the Windows SharePoint Services database. In this case, the properties do not need to be validated because they were previously validated before storage, and the ShouldValidate property value will be false. This property is available only at runtime.