Input Email pattern Property
Examples
Get the value of the pattern attribute of the email field:
xThe output result is:
Try it yourself »
Definition and Usage
The pattern attribute is used to set or return the value of the pattern attribute of the email field.
The pattern attribute describes a regular expression that is used to validate the value of the email field.
Tip:Use the global HTMLtitleattribute or DOMtitleattribute to help the user describe the pattern.
Tip:You can learn aboutregular expressions 。
Tip:You can also check out ourJavaScript RegExp Reference。
Browser Support
![]()
Internet Explorer 10, Firefox, Opera, and Chrome support the pattern attribute.
Note:Internet Explorer 9 and earlier IE versions, and Safari do not support the pattern attribute.
Note:Internet Explorer 9 and earlier IE versions, and Safari do not support the <input type="email"> element.
Syntax
Return the pattern attribute:
Set the pattern attribute:
Attribute Values
| Value | Description |
|---|---|
| regexp | Describes the regular expression used to validate the email field |
Technical Details
| Return Value: | A string representing a regular expression |
|---|
Related Pages
HTML Reference:HTML <input> pattern Attribute
Other extensions
Input Email Object