Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
validity は HTMLButtonElement インターフェイスの読み取り専用プロパティで、この要素の有効状態を表す ValidityState オブジェクトを返します。
ValidityState オブジェクトです。
次の例は、 <button> に customError が設定されている場合、不正な状態にあることを示しています。この状態では、validityState の validity プロパティは false ですが、checkValidity() は、ボタンの type が "submit" でない場合、制約検証の対象ではないため、true を返します。
| HTML # the-constraint-validation-api:dom-cva-validity |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年4月12日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.