Skip to main content

A collection of Python functions designed to validate various types of input. These functions can be used to ensure that user inputs such as passwords, emails, and other required fields meet specific criteria.

Project description

Validator Functions Repository

This repository contains a collection of Python functions designed to validate various types of input. These functions can be used to ensure that user inputs such as passwords, emails, and other required fields meet specific criteria.

Features

  • Password Validator: Checks if the password meets the required structure (e.g., length, special characters, uppercase, and lowercase).
  • Email Validator: Validates the structure of an email to ensure it follows standard email formatting rules.
  • Null Check: Ensures that the input is not null or empty.
  • Custom Validators: Other custom validation functions tailored for specific use cases.

Installation

You can install this package using pip:

pip install checkBest

Usage

Here is how you can use the provided validation functions:

Password Validator

from checkBest import checkPassword

password = "YourP@ssw0rd"
if checkPassword(password):
    print("Password is valid!")
else:
    print("Password is invalid.")

Email Validator

from checkBest import checkEmail

email = "example@example.com"
if checkEmail(email):
    print("Email is valid!")
else:
    print("Email is invalid.")

Null Check

from checkBest import checkInput

input_value = ["test", 2, "test2", null]
if checkInput(input_value):
    print("Inputs is not null!")
else:
    print("Inputs is null.")

Phone/Line Check

from checkBest import checkPhone

input_value = "09123456789"
if checkPhone(input_value, "phone"):
    print("Inputs is valid!")
else:
    print("Inputs is invalid.")

input_value = "01234567890"
if checkPhone(input_value, "line"):
    print("Input is valid!")
else:
    print("Input is invalid.")

Type Int Check

from checkBest import checkInputInt

input_value = "524155"
if checkInputInt(input_value) is False:
    print("Input is not Int!")
else:
    print("Input is Int.")

Functions List

  • checkPassword(password: str) -> bool: Returns True if the password is valid based on predefined criteria.
  • checkEmail(email: str) -> bool: Returns True if the email is valid.
  • checkInput(input_value: list) -> bool: Returns True if the all inputs is not null or empty.
  • checkPhone(input_value: str, tp: str) -> bool: Returns True if the input is a phone or live valid.
  • checkInputInt(input_value: any) -> bool: Returns False if the input is not Int.

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request. We welcome any improvements or additional validators.

Contact

For any questions or inquiries, feel free to open an issue or contact me at senator136019@gmail.com.

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

checkBest-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

checkBest-0.1.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file checkBest-0.1.1.tar.gz.

File metadata

  • Download URL: checkBest-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for checkBest-0.1.1.tar.gz
Algorithm Hash digest
SHA256 498e1b661aa7ca45f8f87d13b3c96128292c081ec6badf3db1d18b86b1001885
MD5 166811d507b5df801028a0411d5b4475
BLAKE2b-256 88e3163df75d1756fb76d594fe0bb95628aaff5256a2fc645999a6ac9c5370e2

See more details on using hashes here.

File details

Details for the file checkBest-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: checkBest-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for checkBest-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db20eb626ab0eadb93dd59270ebbe0fd8cd788000c0abe123b65927277ecc219
MD5 93f35199d9742ab9e5c9e111b6159408
BLAKE2b-256 cc8c7775aa1553a81a4183f393d91d92a4859b7d691ae142839a27ef012e873b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page