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
Validity
Gets the current validation state of the current element.
[DomName("validity")]
IValidityState Validity { get; }
Property Value
WillValidate
Gets a value if the current element validates.
[DomName("willValidate")]
bool WillValidate { get; }
Property Value
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
stringThe error message to use.