<form action="/example.php" method="get"> Country code: <input type="text" name="country_code" pattern="[A-z]{5}" title="Three letter country code" /> <input type="submit" /> </form>