From 1d2c3549dad25fb5e5a180630a85e3a3d0f92d1b Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 26 Mar 2021 08:54:26 +0900 Subject: [PATCH] fix Web/API/ValidityState (#3494) - set \ elements to literals - correct a link --- files/en-us/web/api/validitystate/index.html | 26 +++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/files/en-us/web/api/validitystate/index.html b/files/en-us/web/api/validitystate/index.html index 0de2fc29e42a3b1..80dbe9c44965e59 100644 --- a/files/en-us/web/api/validitystate/index.html +++ b/files/en-us/web/api/validitystate/index.html @@ -14,7 +14,7 @@

Properties

-

For each of these Boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.

+

For each of these Boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.

{{domxref("ValidityState.badInput", "badInput")}} {{ReadOnlyInline}}
@@ -22,34 +22,36 @@

Properties

customError {{ReadOnlyInline}}
A {{jsxref("Boolean")}} indicating whether the element's custom validity message has been set to a non-empty string by calling the element's {{domxref('HTMLObjectElement.setCustomValidity', 'setCustomValidity()')}} method.
{{domxref("ValidityState.patternMismatch", "patternMismatch")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value does not match the specified {{htmlattrxref("pattern", "input")}}, and false if it does match. If true, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.
+
A {{jsxref("Boolean")}} that is true if the value does not match the specified {{htmlattrxref("pattern", "input")}}, and false if it does match. If true, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.
{{domxref("ValidityState.rangeOverflow", "rangeOverflow")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value is greater than the maximum specified by the {{htmlattrxref("max", "input")}} attribute, or false if it is less than or equal to the maximum. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} and CSS pseudo-classes.
+
A {{jsxref("Boolean")}} that is true if the value is greater than the maximum specified by the {{htmlattrxref("max", "input")}} attribute, or false if it is less than or equal to the maximum. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} and CSS pseudo-classes.
{{domxref("ValidityState.rangeUnderflow", "rangeUnderflow")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value is less than the minimum specified by the {{htmlattrxref("min", "input")}} attribute, or false if it is greater than or equal to the minimum. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
+
A {{jsxref("Boolean")}} that is true if the value is less than the minimum specified by the {{htmlattrxref("min", "input")}} attribute, or false if it is greater than or equal to the minimum. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
{{domxref("ValidityState.stepMismatch", "stepMismatch")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value does not fit the rules determined by the {{htmlattrxref("step", "input")}} attribute (that is, it's not evenly divisible by the step value), or false if it does fit the step rule. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
+
A {{jsxref("Boolean")}} that is true if the value does not fit the rules determined by the {{htmlattrxref("step", "input")}} attribute (that is, it's not evenly divisible by the step value), or false if it does fit the step rule. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
{{domxref("ValidityState.tooLong", "tooLong")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value exceeds the specified maxlength for {{domxref("HTMLInputElement")}} or {{domxref("HTMLTextAreaElement")}} objects, or false if its length is less than or equal to the maximum length. Note: This property is never true in Gecko, because elements' values are prevented from being longer than maxlength. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
+
A {{jsxref("Boolean")}} that is true if the value exceeds the specified maxlength for {{domxref("HTMLInputElement")}} or {{domxref("HTMLTextAreaElement")}} objects, or false if its length is less than or equal to the maximum length. Note: This property is never true in Gecko, because elements' values are prevented from being longer than maxlength. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
{{domxref("ValidityState.tooShort", "tooShort")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value fails to meet the specified minlength for {{domxref("HTMLInputElement")}} or {{domxref("HTMLTextAreaElement")}} objects, or false if its length is greater than or equal to the minimum length. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
+
A {{jsxref("Boolean")}} that is true if the value fails to meet the specified minlength for {{domxref("HTMLInputElement")}} or {{domxref("HTMLTextAreaElement")}} objects, or false if its length is greater than or equal to the minimum length. If true, the element matches the {{cssxref(":invalid")}} and {{cssxref(":out-of-range")}} CSS pseudo-classes.
{{domxref("ValidityState.typeMismatch", "typeMismatch")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the value is not in the required syntax (when {{htmlattrxref("type", "input")}} is email or url), or false if the syntax is correct. If true, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.
+
A {{jsxref("Boolean")}} that is true if the value is not in the required syntax (when {{htmlattrxref("type", "input")}} is email or url), or false if the syntax is correct. If true, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.
valid {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the element meets all its validation constraints, and is therefore considered to be valid, or false if it fails any constraint. If true, the element matches the {{cssxref(":valid")}} CSS pseudo-class; the {{cssxref(":invalid")}} CSS pseudo-class otherwise.
+
A {{jsxref("Boolean")}} that is true if the element meets all its validation constraints, and is therefore considered to be valid, or false if it fails any constraint. If true, the element matches the {{cssxref(":valid")}} CSS pseudo-class; the {{cssxref(":invalid")}} CSS pseudo-class otherwise.
{{domxref("ValidityState.valueMissing", "valueMissing")}} {{ReadOnlyInline}}
-
A {{jsxref("Boolean")}} that is true if the element has a {{htmlattrxref("required", "input")}} attribute, but no value, or false otherwise. If true, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.
+
A {{jsxref("Boolean")}} that is true if the element has a {{htmlattrxref("required", "input")}} attribute, but no value, or false otherwise. If true, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.

Specifications

- + + + @@ -76,5 +78,5 @@

See also

Specification Status Comment
{{ SpecName('HTML WHATWG', 'form-control-infrastructure.html#validitystate', 'ValidityState') }} {{Spec2('HTML WHATWG')}}