summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-fieldset-element/fieldset-setcustomvalidity.html
blob: 64aa374f19028878dfb856326574cf693d8ad29d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!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>