{"id":18915886,"url":"https://github.com/multiform-validator/python","last_synced_at":"2026-03-02T08:00:55.483Z","repository":{"id":247536903,"uuid":"826082880","full_name":"Multiform-Validator/python","owner":"Multiform-Validator","description":"Python library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more.","archived":false,"fork":false,"pushed_at":"2024-07-10T20:22:31.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-09T23:40:12.466Z","etag":null,"topics":["multiform-validator","python","python-library","security-tools","validation-library"],"latest_commit_sha":null,"homepage":"https://multiformvalidator.netlify.app/documentation/py","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Multiform-Validator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["gabriel-logan"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"gabriellogan","custom":null}},"created_at":"2024-07-09T04:40:31.000Z","updated_at":"2024-07-26T14:27:59.000Z","dependencies_parsed_at":"2025-02-25T16:51:35.510Z","dependency_job_id":"c6bfcce8-53c3-42d8-b343-1d101289e360","html_url":"https://github.com/Multiform-Validator/python","commit_stats":null,"previous_names":["multiform-validator/python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Multiform-Validator/python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multiform-Validator%2Fpython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multiform-Validator%2Fpython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multiform-Validator%2Fpython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multiform-Validator%2Fpython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Multiform-Validator","download_url":"https://codeload.github.com/Multiform-Validator/python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Multiform-Validator%2Fpython/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29995910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["multiform-validator","python","python-library","security-tools","validation-library"],"created_at":"2024-11-08T10:17:33.440Z","updated_at":"2026-03-02T08:00:55.431Z","avatar_url":"https://github.com/Multiform-Validator.png","language":"Python","readme":"# Multiform-validator\n\n[![PyPI version](https://badge.fury.io/py/multiform-validator.svg)](https://badge.fury.io/py/multiform-validator)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI downloads](https://img.shields.io/pypi/dm/multiform-validator.svg?style=flat-square)](https://pypistats.org/packages/multiform-validator)\n\nThis package provides Python functions to validate various forms fields.\n\nDocumentation: https://multiformvalidator.netlify.app/documentation/py\n\nFeel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!\n\nIf you want to help me, you can buy me a coffee (:\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://www.buymeacoffee.com/gabriellogan\" target=\"_blank\"\u003e\n\t\t\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 50px !important;width: 180px !important;\" \u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n### Installation\n\n```bash\npip install multiform-validator\n```\n\n# Data Validator\n\nThis package contains various modules for validating different types of data. Below are the available validation modules:\n\n# Avaliable for while\n\n- **cnpjValidator**: CNPJ validation.\n- **cpfValidator**: CPF validation.\n- **getOnlyEmail**: Extracts only the email or emails address from a string.\n- **identifyFlagCard**: Identifies the flag of a credit card.\n- **isCreditCardValid**: Credit card validation.\n- **isEmail**: Email address validation format.\n- **passwordStrengthTester**: Password strength test.\n- **validateBRPhoneNumber**: Brazilian phone number validation.\n- **isValidImage**: Image validation.\n\n## Usage\n\nHere is an example of how to use the functions in this package:\n\n```python\nfrom multiform_validator import (\n    cnpjIsValid,\n    cpfIsValid,\n    getOnlyEmail,\n    identifyFlagCard,\n    isCreditCardValid,\n    isEmail,\n    passwordStrengthTester,\n    validateBRPhoneNumber,\n    isValidImage\n)\n```\n\n### Usage Example\n\n```python\n\nprint(\"Is email\", isEmail(\"foo@bar.com\")) # True\nprint(\"Get only email\", getOnlyEmail(\"awdawd wadawd wda awd jhony@gmail.com awdawdawd\")) # jhony@gmail.com\nprint(\"Password strength\", passwordStrengthTester(\"aA1!asd@qd2asd\")) # Strong\nprint(\"Is CPF valid\", cpfIsValid(\"123.456.789-02\")['isValid']) # False\nprint(\"Is CNPJ valid\", cnpjIsValid(\"12.345.678/0001-09\")) # { 'isValid': False, 'errorMsg': 'CNPJ is not valid' }\nprint(\"Is credit card valid\", isCreditCardValid(\"5117 2161 1334 8362\")) # True\nprint(\"Identify flag card\", identifyFlagCard(\"5117 2161 1334 8362\")) # Mastercard\nprint(\"Validate BR phone number\", validateBRPhoneNumber(\"(11) 91234-5678\")) # { 'isValid': True, 'errorMsg': None }\n\n```\n\n### isValidImage Usage Example\n\n```python\nimport os\nfrom pathlib import Path\n\nfrom multiform_validator import isValidImage\n\n# Resolve the file path\nfile_path = Path.cwd() / 'static' / 'uploads'\nretrieved_file = file_path / filename\n\n# Read the first 4 bytes of the file\nwith open(retrieved_file, 'rb') as f:\n    file_buffer = f.read(4)\n\nprint(isValidImage(file_buffer)) # True or False\n```\n\n## Functions signature\n\nAll params with default values are optional.\n\n```python\n\ndef isEmail(email: str) -\u003e bool:\n    pass\n\ndef getOnlyEmail(text: str, multiple=False, clean_domain=False, repeat_email=False) -\u003e str:\n    pass\n\ndef passwordStrengthTester(password: str) -\u003e str:\n    pass\n\ndefaultErrorMsgCPF = [\n  'CPF invalid',\n  'CPF must have 11 numerical digits',\n  'CPF is not valid',\n  'Unknown error',\n]\ndef cpfIsValid(cpf: str, errorMsg=defaultErrorMsgCPF) -\u003e Dict[str, Union[bool, str, None]]:\n    pass\n\ndefault_error_msgCNPJ = [\n   'CNPJ invalid', \n   'CNPJ must have 14 numerical digits', \n   'CNPJ is not valid', \n   'Unknown error'\n]\ndef cnpjIsValid(cnpj: str, errorMsg=default_error_msgCNPJ) -\u003e Dict[str, Union[bool, str, None]]:\n    pass\n\ndef isCreditCardValid(cardNumber: str) -\u003e bool:\n    pass\n\ndef identifyFlagCard(cardNumber: str) -\u003e str:\n    pass\n\ndefault_error_msg = ['Invalid value passed', 'Invalid phone number', 'Unknown error']\ndef validateBRPhoneNumber(phoneNumber: str, errorMsg=default_error_msg) -\u003e Dict[str, Union[bool, str, None]]:\n    pass\n\ndef isValidImage(file_buffer: bytes) -\u003e bool:\n    pass\n\n```\n\n## Looking for contributions. \n\n## Available Validation Modules !!! STILL NOT AVALIABLE !!!\n\n- **isAscii**: Checks if the string contains only ASCII characters.\n- **isBase64**: Checks if the string is a valid Base64 encoding.\n- **isCEP**: CEP validation (Brazilian postal code).\n- **isDate**: Date format validation.\n- **isDecimal**: Checks if the number is a decimal.\n- **isEmpty**: Checks if the string is empty.\n- **isMACAddress**: MAC address validation.\n- **isMD5**: Checks if the string is a valid MD5 hash.\n- **validatePassportNumber**: Passport number validation.\n- **isPort**: Port number validation.\n- **isPostalCode**: Postal code validation.\n- **isTime**: Time format validation.\n- **validateEmail**: Email address full validation.\n- **validatePassword**: Password validation.\n- **validatePhoneNumber**: Phone number validation.\n- **validateUsername**: Username validation.\n- **validateUSPhoneNumber**: US phone number validation.\n- **isNumber**: Checks if the value is a number.\n- **validateName**: Name validation.\n- **validateSurname**: Surname validation.\n- **validateTextarea**: Textarea validation.\n\n### For better information, read the documentation\n\nFeel 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!\n\n# By - Gabriel Logan\n","funding_links":["https://github.com/sponsors/gabriel-logan","https://buymeacoffee.com/gabriellogan","https://www.buymeacoffee.com/gabriellogan"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiform-validator%2Fpython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiform-validator%2Fpython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiform-validator%2Fpython/lists"}