HTMLButtonElement: phương thức reportValidity()

Baseline Widely available

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

Phương thức reportValidity() của giao diện HTMLButtonElement thực hiện cùng hành động như checkValidity(), nhưng cũng báo cáo kết quả cho người dùng nếu sự kiện invalid không bị hủy.

Cú pháp

js
reportValidity();

Giá trị trả về

Một giá trị boolean.

Đặc tả kỹ thuật

Thông số kỹ thuật
HTML
# dom-cva-reportvalidity-dev

Tương thích trình duyệt