DOM Properties
ValidityState.typeMismatch
True for a nonempty value that fails email or URL syntax rules. It does not verify that an email address or URL exists. Example result: true.
Formal Syntax & Structure
html syntaxhtml
input.validity.typeMismatchReturn Value
boolean
Read-only constraint flag.
Working Example
Example Snippethtml
<input type="email" value="ada" aria-label="Email"><p> Result: <output id="result"></output></p><script> const result = document.getElementById("result"); (async () => { const input = document.querySelector("input"); result.textContent = input.validity.typeMismatch; })().catch(error => { result.textContent = "Error: " + error.name; });</script>