Leakbali
w3 Tutorial, Web Tutorial
Register   Login
Share

pattern Attribute 


The pattern attribute specifies a pattern used to validate an input field.

The pattern is a regular expression. You can read about this in our JavaScript tutorial.

Note: The pattern attribute works with the following <input> types: text, search, url, telephone, email, and password

The example below shows a text field that can only contain three letters (no numbers or special characters):
Country code: <input type="text" name="country_code" pattern="[A-z]{3}" title="Three letter country code" />
More Tutorial
  1. HTML5 - New Form Attributes
  2. HTML5 - Browser Support
  3. HTML5 - autocomplete Attribute
  4. HTML5 - autofocus Attribute
  5. HTML5 - form Attribute
  6. HTML5 - Form Override Attributes
  7. HTML5 - height and width Attribute
  8. HTML5 - list Attribute
  9. HTML5 - min, max and step Attributes
  10. HTML5 - multiple Attribute
  11. HTML5 - novalidate Attribute
  12. HTML5 - pattern Attribute
  13. HTML5 - placeholder Attribute
  14. HTML5 - required Attribute

Tutorial


References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References