A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/attributes/pattern below:

pattern · WebPlatform Docs

pattern Summary

The pattern attribute specifies a regular expression that the <input> element’s value is checked against.

Applies to [HTMLInputElement](/html/elements/input)

## Examples

Numeric field: <input type="text" name="numericField" pattern="[0-9]*" />
Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three letter country code">
Notes Remarks

Several generic messages are displayed for a variety of validation errors. If you use a title attribute on an input element, it will both be shown as alt text for the field, as well as be appended to the generic error message. The following example shows a ZIP code number format.

Syntax Standards information See also Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4