This npm package provides JavaScript functions to generate valid Brazilian CPF (Cadastro de Pessoas Físicas) and CNPJ (Cadastro Nacional da Pessoa Jurídica) numbers.
Project description
cpf_and_cnpj-generator
This package provides Python functions to validate various forms fields.
Documentation: https://gabriel-logan.github.io/cpf_and_cnpj-generator/documentation/py
Feel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!
If you want to help me, you can buy me a coffee (:
Installation
pip install cpf_and_cnpj-generator
Avaliable Functions
- cnpjValidator: CNPJ validation.
- cpfValidator: CPF validation.
Usage
Here is an example of how to use the functions in this package:
from multiform_validator import (
cnpjIsValid,
cpfIsValid,
)
print("Is email", isEmail("foo@bar.com")) # True
print("Get only email", getOnlyEmail("awdawd wadawd wda awd jhony@gmail.com awdawdawd")) # jhony@gmail.com
print("Password strength", passwordStrengthTester("aA1!asd@qd2asd")) # Strong
print("Is CPF valid", cpfIsValid("123.456.789-02")['isValid']) # False
print("Is CNPJ valid", cnpjIsValid("12.345.678/0001-09")) # { 'isValid': False, 'errorMsg': 'CNPJ is not valid' }
print("Is credit card valid", isCreditCardValid("5117 2161 1334 8362")) # True
print("Identify flag card", identifyFlagCard("5117 2161 1334 8362")) # Mastercard
print("Validate BR phone number", validateBRPhoneNumber("(11) 91234-5678")) # { 'isValid': True, 'errorMsg': None }
Feel free to explore the various functions and experiment with different inputs to understand their behavior. If you encounter any issues or have suggestions, don't hesitate to reach out to me. Your feedback is valuable and helps improve the package. Happy coding!
By - Gabriel Logan
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
Built Distribution
Hashes for cpf_and_cnpj_generator-0.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5190f8cbd2ae55f8e6c1577cfb18c08f11f1ed983bb558d68246b5917dd66c1d |
|
MD5 | 260ff0df6fa7e07859303cb0ac53ca37 |
|
BLAKE2b-256 | 51e25ebf3aa68cd501e6f46da2fa5ff91e0a91df8fc727bef5a44c6cc47262c8 |
Hashes for cpf_and_cnpj_generator-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daecedd04711be36f44ffddad811ecb5059526c75c9ac96b8ea4753c0d561cc2 |
|
MD5 | 11a6920772973375e3a527c27c6a6109 |
|
BLAKE2b-256 | 3712d14245bfde51b84d0104873ec161ddf929fc9a6e9afded8a5c7ffcf66ed9 |