This attribute is used to specify the regular expression on which the input elements value is checked against. This attribute works with the following input types: text, password, date, search, email etc. Use the Global title attribute to describe the pattern for helping the user.
<input pattern = "regular_exp">
Element: This attribute is associated with <input> element only.
Attribute: This attribute specifies the regular expression.
Supported Browsers: The browser supported by pattern attribute are listed below:
- Google Chrome 5.0 and above
- Firefox 4.0 and above
- Internet Explorer 10.0 and above
- Opera 9.6 and above
- Apple Safari: Not supported