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

Instalação

  pip install multi-validator-generator

Exemplos

  1. Importanto biblioteca
  import multivalidator as mv

read

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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for multi-validator-generator-0.0.7.tar.gz
Algorithm Hash digest
SHA256 f858b732268b4a5d0330b42e39764bab30df4e19ac735c806fcc06dff348f447
MD5 60d9f4e2a713807fc89480e1c6719ac1
BLAKE2b-256 f38b5cc88d8aa4fe7c41e36bc3bb989ab6864f9c56ee3479ebb5d7f0975ce9e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for multi_validator_generator-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9423670d46efe03560b78b7229c9395476bd87752fb996ef6f1f4a81b4e11bd1
MD5 c3e0fcfab4fe9a345238a93979b8aef1
BLAKE2b-256 b4bca6bafcc053eee13e279e8025acaaf7f507e7add8f9ff46996f85fcbccecb

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