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.6.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

multi_validator_generator-0.0.6-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for multi-validator-generator-0.0.6.tar.gz
Algorithm Hash digest
SHA256 6527dc5955acf46d21b4356e72084d2f8a4508d4eafee9219841fd0707c32f4d
MD5 5cbe41b7b234154b3e22a8ed2df37fbd
BLAKE2b-256 759aabac02029657bb6861eb0fe9fd9acc1f30c3eb2b8fd77048973a89904bf6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for multi_validator_generator-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 40d901775f97323413e61667edebf53869169e6455b2486748ddd190bee6bfc1
MD5 76af36d781c6a70499202b1abfad760d
BLAKE2b-256 7dfbf3d0a8333c8b92aa35ae9f34fb2fe89472091005111899e5adba0c90a9e1

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