Share via


RichImageField.Validate Method

Validate the content that is posted to this control.

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

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Overrides Sub Validate
'Usage
Dim instance As RichImageField

instance.Validate()
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public override void Validate()

Implements

IValidator.Validate()

Remarks

This method uses an HtmlValidationContext.ValidateImageValue method to ensure that the content is safe and to validate that the content meets any constraints specified by the AllowHyperlinks or AllowExternalUrls properties of this control. It also ensures that there is a value if the Field.Required schema property is set to True. If any constraints, violations or "Required" violations occur then it sets IsValid to false and its ErrorMessage property to a description of the validation problem.

See Also

Reference

RichImageField Class

RichImageField Members

Microsoft.SharePoint.Publishing.WebControls Namespace

RichImageField