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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for multi-validator-generator-0.0.8.tar.gz
Algorithm Hash digest
SHA256 7c4bdd2c897ba1df346682ba8dd24f661f020a7ee0343b3058cd1281c136b96f
MD5 4a977aa97f9df6dc05808907976de81c
BLAKE2b-256 fa84094f80e9d022d426fbf1f9c72049b357ff3b24a649ce53673aa4a058167c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for multi_validator_generator-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 11eb516905a838bd9f8e7c380332b6833881d7cd714acba3292f3e6e2c55a0fe
MD5 992913826e21affd37bd6353551c31df
BLAKE2b-256 3a3cb8734d32b1ee128b89a5d6ecd23924ed6e47442be11c702728bbf8263844

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