aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/htmlformelement/reportvalidity
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-10-02 17:20:24 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-10-02 17:30:20 +0200
commit1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch)
tree30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/htmlformelement/reportvalidity
parentc05efa8d7ae464235cf83d7c0956e42dc6974103 (diff)
downloadtranslated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip
convert content to md
Diffstat (limited to 'files/fr/web/api/htmlformelement/reportvalidity')
-rw-r--r--files/fr/web/api/htmlformelement/reportvalidity/index.md60
1 files changed, 22 insertions, 38 deletions
diff --git a/files/fr/web/api/htmlformelement/reportvalidity/index.md b/files/fr/web/api/htmlformelement/reportvalidity/index.md
index c41fd7c61d..d54f17148d 100644
--- a/files/fr/web/api/htmlformelement/reportvalidity/index.md
+++ b/files/fr/web/api/htmlformelement/reportvalidity/index.md
@@ -6,53 +6,37 @@ tags:
- Méthode
translation_of: Web/API/HTMLFormElement/reportValidity
---
-<div>{{APIRef("HTML DOM")}}</div>
+{{APIRef("HTML DOM")}}
-<p>La méthode  <strong><code>HTMLFormElement.reportValidity()</code></strong> renvoie true si les contrôles enfants de l'élément répondent à leurs contraintes de validation. Lorsque la valeur <code>false</code> est renvoyée, ,  les événements <code><a href="/en-US/docs/Web/Events/invalid">invalid</a></code> annulables sont déclenchés pour chaque enfant non valide et les problèmes de validation sont signalés à l'utilisateur. .</p>
+La méthode  **`HTMLFormElement.reportValidity()`** renvoie true si les contrôles enfants de l'élément répondent à leurs contraintes de validation. Lorsque la valeur `false` est renvoyée, ,  les événements [`invalid`](/en-US/docs/Web/Events/invalid) annulables sont déclenchés pour chaque enfant non valide et les problèmes de validation sont signalés à l'utilisateur. .
-<h2 id="Syntax">Syntax</h2>
+## Syntax
-<pre class="syntaxbox"><em>HTMLFormElement</em>.reportValidity()
-</pre>
+ HTMLFormElement.reportValidity()
-<h3 id="Valeur_de_retour">Valeur de retour</h3>
+### Valeur de retour
-<p>{{domxref("Boolean")}}</p>
+{{domxref("Boolean")}}
-<h2 id="Exemple">Exemple</h2>
+## Exemple
-<pre class="brush: js">document.forms['myform'].addEventListener('invalid', function() {
+```js
+document.forms['myform'].addEventListener('invalid', function() {
// Optional response here
}, false);
document.forms['myform'].addEventListener('submit', function() {
document.forms['myform'].reportValidity();
-}, false);</pre>
-
-<h2 id="Specifications">Specifications</h2>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Commentaire</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName("HTML WHATWG", "forms.html#dom-cva-reportvalidity", "HTMLFormElement.reportValidity()")}}</td>
- <td>{{Spec2("HTML WHATWG")}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName("HTML5.1", "semantics.html#the-constraint-validation-api", "HTMLFormElement.reportValidity()")}}</td>
- <td>{{Spec2("HTML5.1")}}</td>
- <td>Définition initiale</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_du_navigateur">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("api.HTMLFormElement.reportValidity")}}</p>
+}, false);
+```
+
+## Specifications
+
+| Specification | Status | Commentaire |
+| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | ------------------- |
+| {{SpecName("HTML WHATWG", "forms.html#dom-cva-reportvalidity", "HTMLFormElement.reportValidity()")}} | {{Spec2("HTML WHATWG")}} |   |
+| {{SpecName("HTML5.1", "semantics.html#the-constraint-validation-api", "HTMLFormElement.reportValidity()")}} | {{Spec2("HTML5.1")}} | Définition initiale |
+
+## Compatibilité des navigateurs
+
+{{Compat("api.HTMLFormElement.reportValidity")}}