Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pages: HTML<formcontrol>Element:validationMessage #35945

Merged
merged 3 commits into from
Sep 19, 2024
Merged

New pages: HTML<formcontrol>Element:validationMessage #35945

merged 3 commits into from
Sep 19, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented Sep 18, 2024

part of #35544

@estelle estelle requested a review from a team as a code owner September 18, 2024 21:25
@estelle estelle requested review from sideshowbarker and removed request for a team September 18, 2024 21:25
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Sep 18, 2024

The **`validationMessage`** read-only property of the {{domxref("HTMLInputElement")}} interface returns a string representing a localized message that describes the validation constraints that the {{htmlelement("input")}} control does not satisfy (if any).

If the `<input>` element is not a candidate for constraint validation ({{domxref("HTMLInputElement.willValidate")}} is `false`), or it satisfies its constraints, the value is the empty string (`""`). The value is the empty string if the type is `hidden`, `reset` or `button`, the `<input>` element is disabled, or the `<input>` is not associated with a form as these are not candidates for constraint validation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the `<input>` element is not a candidate for constraint validation ({{domxref("HTMLInputElement.willValidate")}} is `false`), or it satisfies its constraints, the value is the empty string (`""`). The value is the empty string if the type is `hidden`, `reset` or `button`, the `<input>` element is disabled, or the `<input>` is not associated with a form as these are not candidates for constraint validation.
If the `<input>` element is not a candidate for constraint validation ({{domxref("HTMLInputElement.willValidate")}} is `false`), or it satisfies its constraints, the value is the empty string (`""`).

I recommend deleting this so we don't duplicate this information which appears brittle.


## Value

A string; the empty string, `""`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A string; the empty string, `""`;
The empty string, `""`.

Same goes for others

@estelle estelle merged commit 7c9ce43 into main Sep 19, 2024
9 checks passed
@estelle estelle deleted the vm branch September 19, 2024 17:58
fiji-flo pushed a commit that referenced this pull request Oct 2, 2024
* New pages: HTML<formcontrol>Element:validationMessage

* New pages: HTML<formcontrol>Element:validationMessage

* edits based on review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants