Table of Contents

Interface IValidation

Namespace
AngleSharp.Html.Dom
Assembly
AngleSharp.dll

Implemented by elements that can be validated.

[DomNoInterfaceObject]
public interface IValidation
Extension Methods

Properties

ValidationMessage

Gets the current validation message.

[DomName("validationMessage")]
string? ValidationMessage { get; }

Property Value

string

Validity

Gets the current validation state of the current element.

[DomName("validity")]
IValidityState Validity { get; }

Property Value

IValidityState

WillValidate

Gets a value if the current element validates.

[DomName("willValidate")]
bool WillValidate { get; }

Property Value

bool

Methods

CheckValidity()

Checks the validity of the current element.

[DomName("checkValidity")]
bool CheckValidity()

Returns

bool

True if the object is valid, otherwise false.

SetCustomValidity(string)

Sets a custom validation error. If this is not the empty string, then the element is suffering from a custom validation error.

[DomName("setCustomValidity")]
void SetCustomValidity(string error)

Parameters

error string

The error message to use.