Created
May 31, 2024 01:53
-
-
Save GabrielBdeC/7ed21782b838afe876848aa20b71b416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Com máscara | |
/^\+?55 ?(\(\d{2}\)|\d{2}) ?(9 ?\d{4}|[2345]\d{3})(-?| ?)\d{4}$/ | |
// Sem máscara | |
/^55\d{2}(9\d{4}|[2345]\d{3})\d{4}$/ | |
Obrigatório uso de 55, se for opcional, adicionar ? após o 55 | |
9 é opcional, mas, se for não usado, apenas aceita 2 a 5 (números fixos) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment