pattern in html input

HTML
<input type="text" pattern="[A-Za-z]{3}">Pattern attribute is used as regular expression matching with input value due to this it validate the input.
Example:
<input type="text" pattern="[A-Za-z]{3}">
Source

Also in HTML: