Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-fieldset-element/fieldset-setcustomvalidity.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<title>fieldset setCustomValidity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<fieldset id='fieldset_test'></fieldset>
<script>
test(() => {
let elem = document.getElementById("fieldset_test");
assert_false(elem.validity.customError);
elem.setCustomValidity("custom error");
assert_true(elem.validity.customError);
}, "fieldset setCustomValidity is correct")
</script>