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

Uploaded Source

Built Distribution

multi_validator_generator-0.0.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for multi-validator-generator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 cc7b295533b4b9081f2a05f183e79c69f8341d3b30ee7d890171493e067b3d8c
MD5 60a064a29974153446f1008834277a73
BLAKE2b-256 542040e7b951beaf05936817ca79deee75cd9f507d45574f4f81ddc2fd90cfc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for multi_validator_generator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b4dbed6e0ab821c381da52a0d1a6ee66ba5b47eea7030b84e401d21ee60ea1d8
MD5 920894d3a270e8ea20ec49827b072a4f
BLAKE2b-256 f65603df9715cbc80d88bbc523c92480786748ca263d0df4950704207221b2fb

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