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

Uploaded Source

Built Distribution

multi_validator_generator-0.0.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for multi-validator-generator-0.0.1.tar.gz
Algorithm Hash digest
SHA256 237b88c97df1f04053f009ad471b423dc1f71a08f30db06c05b5445cb427d5f3
MD5 71668b86921e2f9031caf94ee40b493f
BLAKE2b-256 57b02c28203dd721881efe465cf2f226c5a1d9e6e86ad180c4c0ae02934d023f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for multi_validator_generator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9674aea95945d76d6fd2c6cc499ad61c83ccce9f6a2ad6c55cadd871f6a7683
MD5 5a6f00f5175f30f731e313551172999a
BLAKE2b-256 e39c7415cd7b6a4ae97cc28b83552b80cdf7694f7ae723c6c51cd0b66cf130ba

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