-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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: HTMLxElement.setCustomValidity() #35948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two nits that should be applied to every page, otherwise this is good.
### Parameters | ||
|
||
- `string` | ||
- : The string containing the error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- : The string containing the error message. | |
- : The string containing the error message. The empty string removes any custom validity errors. |
|
||
{{ APIRef("HTML DOM") }} | ||
|
||
The **`setCustomValidity()`** method of the {{DOMxRef("HTMLButtonElement")}} interface sets the custom validity message for the {{htmlelement("button")}} element to the specified message. Use the empty string to indicate that the element does _not_ have a custom validity error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The **`setCustomValidity()`** method of the {{DOMxRef("HTMLButtonElement")}} interface sets the custom validity message for the {{htmlelement("button")}} element to the specified message. Use the empty string to indicate that the element does _not_ have a custom validity error. | |
The **`setCustomValidity()`** method of the {{DOMxRef("HTMLButtonElement")}} interface sets the custom validity message for the {{htmlelement("button")}} element. Use the empty string to indicate that the element does _not_ have a custom validity error. |
|
||
{{ APIRef("HTML DOM") }} | ||
|
||
The **`setCustomValidity()`** method of the {{DOMxRef("HTMLFieldSetElement")}} interface sets the custom validity message for the {{htmlelement("fieldset")}} element to the specified message. Use the empty string to indicate that the element does _not_ have a custom validity error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention that fieldset
/output
are not validation targets and therefore the message won't actually be displayed when calling reportValidity
(but will be reported by the validity
object)?
Also, I suggest porting whatever template we used for these few pages to the existing |
* New pages: HTMLxElement.setCustomValidity() * edits based on review
part of #35544