Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Last active January 18, 2024 19:59
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save claudiosanches/9200536 to your computer and use it in GitHub Desktop.
Save claudiosanches/9200536 to your computer and use it in GitHub Desktop.
HTML5 - Validar número de celular em São Paulo
<div class="form-group">
<label for="phone">Telefone <span class="required">*</span></label>
<input type="text" class="form-control" id="phone" name="phone" placeholder="(99) 9999-9999" pattern="(\([0-9]{2}\))\s([9]{1})?([0-9]{4})-([0-9]{4})" title="Número de telefone precisa ser no formato (99) 9999-9999" required="required" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment