JD Form Validator - A Professional Python Library for Input Validations
Project description
JD Form Validator
JD Form Validator is a professional and reusable Python library for validating common form inputs like email, phone number, PAN card, Aadhaar, file types, PIN codes, string lengths, and date of birth.
Installation
pip install jdformvalidator
Available Validators
- Email Validation
- Password Strength Validation
- Phone Number Validation
- PAN Card Validation
- Aadhaar Number Validation
- File Type Validation
- PIN Code Validation
- String Length Validation
- Date of Birth Validation (Age Check - Customizable)
Usage Example
from jdformvalidator.validators import (
is_valid_email, is_strong_password, is_valid_phone,
is_valid_pan, is_valid_aadhaar, is_valid_file_type,
is_valid_pincode, is_valid_length, is_valid_dob
)
# Email Validation
print(is_valid_email('test@gmail.com')) # ✅ True
print(is_valid_email('invalid-email')) # ❌ False
# Password Validation
print(is_strong_password('Password1')) # ✅ True
print(is_strong_password('weak')) # ❌ False
# Phone Number Validation
print(is_valid_phone('9876543210')) # ✅ True
print(is_valid_phone('1234567890')) # ❌ False
# PAN Card Validation
print(is_valid_pan('ABCDE1234F')) # ✅ True
print(is_valid_pan('ABCDE123F')) # ❌ False
# Aadhaar Number Validation
print(is_valid_aadhaar('234567890123')) # ✅ True
print(is_valid_aadhaar('123456789012')) # ❌ False
# File Type Validation
print(is_valid_file_type('document.pdf')) # ✅ True
print(is_valid_file_type('malware.exe')) # ❌ False
# PIN Code Validation
print(is_valid_pincode('600001')) # ✅ True
print(is_valid_pincode('012345')) # ❌ False
# String Length Validation
print(is_valid_length('Jalal', min_length=3)) # ✅ True
print(is_valid_length('Hi', min_length=3)) # ❌ False
# Date of Birth Validator - Customizable Minimum Age
print(is_valid_dob('2000-01-01')) # ✅ True (default min_age=18)
print(is_valid_dob('2005-01-01', min_age=21)) # ❌ False (custom min_age=21)
print(is_valid_dob('2010-01-01', min_age=18)) # ❌ False
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jdformvalidator-1.0.0.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jdformvalidator-1.0.0.tar.gz.
File metadata
- Download URL: jdformvalidator-1.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a50c55d5638f339ed2a3ecf3f13e6ab8defd2069af56c17f3a799c3faceb7019
|
|
| MD5 |
b83ebbd8b5b9e3c1821255ba93f4395d
|
|
| BLAKE2b-256 |
466a5d6fb272a684d8311839a43d9a4ff012af017846df89c3bd6bfecfb81347
|
File details
Details for the file jdformvalidator-1.0.0-py3-none-any.whl.
File metadata
- Download URL: jdformvalidator-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad12fd9909a4df2d1379b20f32becddfca97b145e922d7f39cb81538025eae9a
|
|
| MD5 |
a61de5ce43603fd94d251164d8831139
|
|
| BLAKE2b-256 |
fafc36d56bf391f0f75dca1156780ecd386571c9c64490423e9d70e063d63119
|