diff options
author | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-07-02 23:45:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 23:45:28 +0900 |
commit | 4aac701eef8fa004905305a40844bf8043ce72dc (patch) | |
tree | eaf491a02d544b3b5dfd48cad3cf94cd7d3ec245 /files/ja/web/api/htmlformelement | |
parent | 610c333b45ce0c5da3cebc27b00b37e458d53498 (diff) | |
download | translated-content-4aac701eef8fa004905305a40844bf8043ce72dc.tar.gz translated-content-4aac701eef8fa004905305a40844bf8043ce72dc.tar.bz2 translated-content-4aac701eef8fa004905305a40844bf8043ce72dc.zip |
Web/API/HTMLFormElement/reportValidity を更新 (#1279)
- 2021/06/23 時点の英語版に基づき新規翻訳
Diffstat (limited to 'files/ja/web/api/htmlformelement')
-rw-r--r-- | files/ja/web/api/htmlformelement/reportvalidity/index.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/files/ja/web/api/htmlformelement/reportvalidity/index.html b/files/ja/web/api/htmlformelement/reportvalidity/index.html new file mode 100644 index 0000000000..a37ba5229c --- /dev/null +++ b/files/ja/web/api/htmlformelement/reportvalidity/index.html @@ -0,0 +1,39 @@ +--- +title: HTMLFormElement.reportValidity() +slug: Web/API/HTMLFormElement/reportValidity +tags: + - HTML + - HTMLFormElement + - Method + - Reference +browser-compat: api.HTMLFormElement.reportValidity +translation_of: Web/API/HTMLFormElement/reportValidity +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><strong><code>HTMLFormElement.reportValidity()</code></strong> メソッドは、この要素の子コントロールが制約の検証を満たしていれば <code>true</code> を返します。 + <code>false</code> が返された場合、キャンセル可能な + <code><a href="/ja/docs/Web/API/HTMLInputElement/invalid_event">invalid</a></code> イベントが無効な子それぞれについて発行され、ユーザーに検証の問題を報告します。</p> + +<h2 id="Syntax">構文</h2> + +<pre class="brush: js"><em>HTMLFormElement</em>.reportValidity() +</pre> + +<h3 id="Return_value">返値</h3> + +<p><code>true</code> または <code>false</code></p> + +<h2 id="Example">例</h2> + +<pre class="brush: js">document.forms['myform'].addEventListener('submit', function() { + document.forms['myform'].reportValidity(); +}, false);</pre> + +<h2 id="Specifications">仕様書</h2> + +{{Specifications}} + +<h2 id="Browser_compatibility">ブラウザーの互換性</h2> + +<p>{{Compat}}</p> |