blob: accb24d8f9564f97e12bf4784162ff3cd00f35af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!DOCTYPE HTML>
<title>input setCustomValidity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<input id='input_test'>
<script>
test(() => {
let elem = document.getElementById("input_test");
assert_false(elem.validity.customError);
elem.setCustomValidity("custom error");
assert_true(elem.validity.customError);
}, "input setCustomValidity is correct")
</script>
|