PA
BR Doc
CPF, CNPJ, CEP, CNH, PIS/PASEP, RENAVAM, CNS, license plate and voter ID
validator for Go!
Everything in this file, but the License section, is in portuguese.
Descrição
BR Doc é um pacote para validação, tanto do formato quanto dos dígitos, de
documentos brasileiros.
Aceito PRs de todas as formas. Está permitido escrever em português, também. :)
Uso
Principais funções:
func IsCPF(doc string) boolfunc IsCNPJ(doc string) boolfunc IsCEP(doc string) (valid bool, uf UF)func IsCEPFrom(doc string, ufs ...UF) boolfunc IsCNH(doc string) boolfunc IsPIS(doc string) boolfunc IsRENAVAM(doc string) boolfunc IsPlate(doc string) boolfunc IsNationalPlate(doc string) boolfunc IsMercosulPlate(doc string) boolfunc IsCNS(doc string) boolfunc IsRG(doc string, uf UF) (valid bool, err error)func IsVoterID(doc string) boolfunc IsPhone(phone string) (valid bool, uf UF)func IsPhoneFrom(phone string, ufs ...UF) bool
Coisas a fazer
- validação de CPF
- validação de CNPJ
- validação de CEP
- validação de CNH
- validação de RENAVAM
- validação de placa veicular
- validação de CNS
- validação de título de eleitor
- validação de telefone
- validação de RG
- SP
- RJ
- demais estados
License
This project code is in the public domain. See the LICENSE file.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you shall be in the public domain, without any
additional terms or conditions.