summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-select-element/select-setcustomvalidity.html
blob: 15308c1a8f04c6f9fa3901b9985031e3cf3d79ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE HTML>
<title>select setCustomValidity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<select id='select_test'></select>

<script>

test(() => {
  let elem = document.getElementById("select_test");
  assert_false(elem.validity.customError);
  elem.setCustomValidity("custom error");
  assert_true(elem.validity.customError);
}, "select setCustomValidity is correct")

</script>