다음을 통해 공유


RichLinkField.Validate Method

Validate the content 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 RichLinkField

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

Implements

IValidator.Validate()

Remarks

This method uses an HtmlValidationContext.ValidateLinkValue 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 this method sets IsValid to False and its ErrorMessage property to a description of the validation problem.

See Also

Reference

RichLinkField Class

RichLinkField Members

Microsoft.SharePoint.Publishing.WebControls Namespace

RichLinkField