Skip to content

Instantly share code, notes, and snippets.

@octavioamu
Created February 13, 2015 20:22
Show Gist options
  • Save octavioamu/422569596f1494a84dac to your computer and use it in GitHub Desktop.
Save octavioamu/422569596f1494a84dac to your computer and use it in GitHub Desktop.
tel pattern
<div class="controls">
<input type="tel" id="cadastro-tel" maxlength="2" class="" placeholder="00" pattern="^([0-9]{2})$" required>
<input type="tel" maxlength="10" class="span2" placeholder="0000-0000" required pattern="^([9]{1})?([0-9]{4})-([0-9]{4})|^([9]{1})?([0-9]{4})([0-9]{4})$">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment