Skip to content

Commit 879db96

Browse files
authored
fix: links to correct pages (#37350)
1 parent 87516f2 commit 879db96

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

files/en-us/web/api/elementinternals/setvalidity/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ setValidity(flags, message, anchor)
4343
- `badInput`
4444
- : A boolean value that is `true` if the user has provided input that the browser is unable to convert.
4545
- `customError`
46-
- : A boolean value 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.
46+
- : A boolean value indicating whether the element's custom validity message has been set to a non-empty string by calling the element's {{domxref('HTMLInputElement.setCustomValidity', 'setCustomValidity()')}} method.
4747

4848
> [!NOTE]
4949
> To set all flags to `false`, indicating that this element passes all constraints validation, pass in an empty object `{}`. In this case, you do not need to also pass a `message`.

files/en-us/web/api/htmlbuttonelement/validity/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A {{domxref("ValidityState")}} object.
1616

1717
## Examples
1818

19-
The following example demonstrates that a `<button>` is in an invalid state when a {{domxref("ValidityState/customError", "customError")}} is set; in this state, the `validityState`'s `validity` property is `false`, while {{domxref("HTMLFieldSetElement/checkValidity", "checkValidity()")}} returns `true` if the button's {{domxref("HTMLButtonElement/type", "type")}} is not `"submit"`, because such buttons are not candidates for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation).
19+
The following example demonstrates that a `<button>` is in an invalid state when a {{domxref("ValidityState/customError", "customError")}} is set; in this state, the `validityState`'s `validity` property is `false`, while {{domxref("HTMLButtonElement/checkValidity", "checkValidity()")}} returns `true` if the button's {{domxref("HTMLButtonElement/type", "type")}} is not `"submit"`, because such buttons are not candidates for [constraint validation](/en-US/docs/Web/HTML/Constraint_validation).
2020

2121
```js
2222
const button = document.getElementById("myButton");

files/en-us/web/api/htmlinputelement/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Some properties only apply to input element types that support the corresponding
117117

118118
- {{domxref("HTMLInputElement.validationMessage", "validationMessage")}} {{ReadOnlyInline}}
119119

120-
- : Returns a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation ([`willValidate`](/en-US/docs/Web/API/HTMLObjectElement/willValidate) is `false`), or it satisfies its constraints. This value can be set by the {{domxref("HTMLInputElement.setCustomValidity()", "setCustomValidity()")}} method.
120+
- : Returns a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation ({{domxref("HTMLInputElement.willValidate", "willValidate")}} is `false`), or it satisfies its constraints. This value can be set by the {{domxref("HTMLInputElement.setCustomValidity()", "setCustomValidity()")}} method.
121121

122122
- {{domxref("HTMLInputElement.validity", "validity")}} {{ReadOnlyInline}}
123123

files/en-us/web/api/htmlselectelement/checkvalidity/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ console.log(element.checkValidity());
4646

4747
## See also
4848

49-
- {{domxref("HTMLTextAreaElement.reportValidity()")}}
49+
- {{domxref("HTMLSelectElement.reportValidity()")}}
5050
- {{HTMLElement("textarea")}}
5151
- {{HTMLElement("form")}}
5252
- [Learn: Client-side form validation](/en-US/docs/Learn_web_development/Extensions/Forms/Form_validation)

files/en-us/web/api/validitystate/customerror/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ browser-compat: api.ValidityState.customError
88

99
{{APIRef("HTML DOM")}}
1010

11-
The read-only **`customError`** property of the [`ValidityState`](/en-US/docs/Web/API/ValidityState) interface returns `true` if an element doesn't meet the validation required in the custom validity set by the element's {{domxref("HTMLObjectElement.setCustomValidity", "setCustomValidity()")}} method.
11+
The read-only **`customError`** property of the [`ValidityState`](/en-US/docs/Web/API/ValidityState) interface returns `true` if an element doesn't meet the validation required in the custom validity set by the element's {{domxref("HTMLInputElement.setCustomValidity", "setCustomValidity()")}} method.
1212

1313
## Value
1414

@@ -18,8 +18,8 @@ A boolean that is `true` if a custom error message has been set to a non-empty s
1818

1919
### Detecting a custom error
2020

21-
In this example, {{domxref("HTMLObjectElement.setCustomValidity", "setCustomValidity()")}} sets a custom error message when a form submission contains user input that's considered invalid.
22-
The "Validate input" button calls {{domxref("HTMLFormElement.reportValidity", "reportValidity()")}}, which displays a validation message under the element if a user enters values that do not match the [form's constraints](/en-US/docs/Web/HTML/Constraint_validation#constraint_validation_process).
21+
In this example, {{domxref("HTMLInputElement.setCustomValidity", "setCustomValidity()")}} sets a custom error message when a form submission contains user input that's considered invalid.
22+
The "Validate input" button calls {{domxref("HTMLInputElement.reportValidity", "reportValidity()")}}, which displays a validation message under the element if a user enters values that do not match the [form's constraints](/en-US/docs/Web/HTML/Constraint_validation#constraint_validation_process).
2323

2424
If you enter the text "good" or "fine" and try to validate the input, the field is marked invalid until the custom error message is cleared (set to an empty string).
2525
For comparison, there is a [`minlength`](/en-US/docs/Web/HTML/Attributes/minlength) attribute on the input element that allows us to demonstrate the [`tooShort` validity state](/en-US/docs/Web/API/ValidityState/tooShort) when the user enters less than two characters.

files/en-us/web/api/validitystate/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ For each of these Boolean properties, a value of `true` indicates that the speci
1616
- {{domxref("ValidityState.badInput", "badInput")}} {{ReadOnlyInline}}
1717
- : A boolean value that is `true` if the user has provided input that the browser is unable to convert.
1818
- {{domxref("ValidityState.customError", "customError")}} {{ReadOnlyInline}}
19-
- : A boolean value 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.
19+
- : A boolean value indicating whether the element's custom validity message has been set to a non-empty string by calling the element's {{domxref('HTMLInputElement.setCustomValidity', 'setCustomValidity()')}} method.
2020
- {{domxref("ValidityState.patternMismatch", "patternMismatch")}} {{ReadOnlyInline}}
2121
- : A boolean value that is `true` if the value does not match the specified [`pattern`](/en-US/docs/Web/HTML/Element/input#pattern), and `false` if it does match. If `true`, the element matches the {{cssxref(":invalid")}} CSS pseudo-class.
2222
- {{domxref("ValidityState.rangeOverflow", "rangeOverflow")}} {{ReadOnlyInline}}

0 commit comments

Comments
 (0)