Skip to main content

Um pacote para validar diverso tipos de dados e documentos

Project description

multivalidator

Um validador e gerador para os seguintes parâmetros:

  • Bank Card
  • CNPJ
  • CPF
  • Date
  • Email
  • FoneNumber
  • PassPort
  • PassWord
  • Url

Exemplos

  1. Importanto biblioteca
  import cpf
  import cnpj
  import date
  import emails
  import fone_number
  import passport
  import password
  import url
  import bank_card
  import fake_data

read

  # read: Retorna um objeto iterável que contém o parâmetro escolhido
  # Exemplo:
  cpf = cpf.read("529.982.247-25")
  cnpj = cnpj.read("92.639.324/0001-92")
  date = date.read("08-04-2021")
  email = emails.read("teste@gmail.com")
  fone = fone_number.read("11999999999")
  passport = passport.read("AB1234567")
  password = password.read("123456789")
  url = url.read("https://www.google.com")
  bank_card = bank_card.CreditCard()
  fake_data = fake_data.read(10)

generate

  # Gera um cpf válido e adiciona-o no objeto iterável
  cpf.generate()
  # Saida: ['529.982.247-25', '262.848.575-35']
  # Aviso: Alguns geradores necessitam de parâmetros na sua chamada(Consulte a documentação)

validate

  # Retorna uma tupla com um valor booleano indicando se é valido, e o cpf formatado
  cpf.validate('529.982.247-25')
  #Saída: (True, '529.982.247-25')

add

  # Adiciona um cpf no objeto iterável existente.
  cpf.add('529.982.247-25')
  #Saída: ['529.982.247-25', '262.848.575-35', '171.414.230-28']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multi-validator-generator-0.0.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file multi-validator-generator-0.0.2.tar.gz.

File metadata

File hashes

Hashes for multi-validator-generator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 65bda0c179fe9be6df528d1a5ed3263bc3576c2ffea73481fe441d804e043799
MD5 30ce4684f769e2cc1041d2198304b069
BLAKE2b-256 9b95f2a048fa2ae84ade9febe00dd22d34d61f4914fadbd8505f4ddd707c9c8c

See more details on using hashes here.

File details

Details for the file multi_validator_generator-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for multi_validator_generator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c42074af9e3152d214c6a94d8fc6f700b9be86160b70a54825845e62f762021
MD5 1dafe0ed0314e716876c31d4b1680ad4
BLAKE2b-256 05d974e88b75e4cadf4cb6cbb1f87e3cb8b87cd403c632669b848b602b128f90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page