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/constraints/infinite_backtracking.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>The infinite pattern validation test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<input type=text id=badinput value="12345678901234567890123456789123456789z" pattern="(\d+)*$">
<script>
test(function(){
var elements = document.querySelectorAll(":invalid");
assert_array_equals(elements, [document.getElementById('badinput')]);
}, "Infinite backtracking pattern terminates");
</script>