ValidityState Class

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#validitystate

public sealed class ValidityState

Properties

NameDescription
BadInputGets a value indicating whether the user provided input that cannot be converted to a value.
CustomErrorGets a value indicating whether a custom validity error message is set.
PatternMismatchGets a value indicating whether the value does not match the required pattern.
RangeOverflowGets a value indicating whether the value is greater than the maximum.
RangeUnderflowGets a value indicating whether the value is lower than the minimum.
StepMismatchGets a value indicating whether the value does not fit the allowed step.
TooLongGets a value indicating whether the value is longer than the maximum length.
TooShortGets a value indicating whether the value is shorter than the minimum length.
TypeMismatchGets a value indicating whether the value is not in the required syntax (such as an e-mail address or a URL).
Validhttps://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-validitystate-valid
ValueMissingGets a value indicating whether the control is required but has no value.

Gets a value indicating whether the user provided input that cannot be converted to a value.

public bool BadInput { get; }

Gets a value indicating whether a custom validity error message is set.

public bool CustomError { get; }

PatternMismatch

FormAssociated.cs

Gets a value indicating whether the value does not match the required pattern.

public bool PatternMismatch { get; }

RangeOverflow

FormAssociated.cs

Gets a value indicating whether the value is greater than the maximum.

public bool RangeOverflow { get; }

RangeUnderflow

FormAssociated.cs

Gets a value indicating whether the value is lower than the minimum.

public bool RangeUnderflow { get; }

StepMismatch

FormAssociated.cs

Gets a value indicating whether the value does not fit the allowed step.

public bool StepMismatch { get; }

Gets a value indicating whether the value is longer than the maximum length.

public bool TooLong { get; }

Gets a value indicating whether the value is shorter than the minimum length.

public bool TooShort { get; }

TypeMismatch

FormAssociated.cs

Gets a value indicating whether the value is not in the required syntax (such as an e-mail address or a URL).

public bool TypeMismatch { get; }

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-validitystate-valid

public bool Valid { get; }

ValueMissing

FormAssociated.cs

Gets a value indicating whether the control is required but has no value.

public bool ValueMissing { get; }