HTMLButtonElement: validity property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The validity read-only property of the HTMLButtonElement interface returns a ValidityState object that represents the validity states this element is in.

Value

A ValidityState object.

Examples

The following example demonstrates that a

Specifications

Specification
HTML
# the-constraint-validation-api:dom-cva-validity

Browser compatibility

See also