Skip to content

Instantly share code, notes, and snippets.

@goonursultan
goonursultan / index.html
Created June 30, 2018 05:52
input masking
<!-- see https://github.com/estelle/input-masking/ for a detailed explanation--><ul>
<li>
<label for="expiration">Credit Card Expiration Month</label>
<input id="expiration" type="tel" placeholder="MM/YY" class="masked" pattern="(1[0-2]|0[1-9])\/\d\d" data-valid-example="11/18" title="2-digit month and 2-digit year">
</li>
<li>
<label for="zip">Zip Code</label>
<input id="zip" type="tel" name="zipcode" placeholder="XXXXX" pattern="\d{5}" class="masked" title="5-digit zip code">
</li>