patternMismatch property

bool get patternMismatch

The read-only patternMismatch property of a ValidityState object indicates if the value of an input, after having been edited by the user, does not conform to the constraints set by the element's pattern attribute.

The patternMismatch property will be true if and only if the following conditions are all true:

  • the field supports the pattern attribute — which means the input is of type text, tel, email, url, password, or search
  • the pattern attribute contains a valid regular expression
  • the input value doesn't conform to the constraints set by the pattern value.

Implementation

external bool get patternMismatch;