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月.
validationMessage は HTMLButtonElement インターフェイスの読み取り専用プロパティで、(もしあれば)この <button> コントロールが満たさない検証制約を記述したローカライズされたメッセージを表す文字列を返します。このコントロールが制約検証の対象ではない場合(<button> の type が button または reset である場合)、または制約を満たしている場合は空文字列となります。
もし、この <button> が制約検証の対象であり(type が submit に設定されているか既定値、またはHTMLButtonElement.willValidate が true)、制約が満たされていない場合(ValidityState.customError が null でない)、値は検証中にユーザーに表示されるエラーメッセージとなります。
文字列です。
| HTML # dom-cva-validationmessage-dev |
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.