A library to validate vehicle and user details
Project description
Vehicle Form Validation Library
The library allows you to validate your form inputs using OOPS principles. It has cutomized fields like vehicle make, vehicle type etc also it provides liscence validations specific to country. In addtion to vehicles it provides user details validations.
Installation
Install the library with: pip install vehicle_form_validator
USAGE
from vehicle_form_validator import FieldValidator
Vehicle Type Validation
vehicle_type = "Car" if FieldValidator.validate_vehicle_type(vehicle_type): print(f"'{vehicle_type}' is a valid vehicle type.") else: print(f"'{vehicle_type}' is an invalid vehicle type.")
Vehicle Make Validation
vehicle_make = "Toyota" if FieldValidator.validate_vehicle_make(vehicle_make): print(f"'{vehicle_make}' is a valid vehicle make.") else: print(f"'{vehicle_make}' is an invalid vehicle make.")
License Plate Validation (Ireland)
license_plate = "12-34ABC" if FieldValidator.validate_license_plate(license_plate, country_code="IE"): print(f"'{license_plate}' is a valid license plate for Ireland.") else: print(f"'{license_plate}' is an invalid license plate for Ireland.")
Phone Number Validation (Ireland)
phone_number = "+353123456789" if FieldValidator.validate_phone_number(phone_number, country_code="IE"): print(f"'{phone_number}' is a valid Irish phone number.") else: print(f"'{phone_number}' is an invalid Irish phone number.")
Email Validation
email = "test@example.com" if FieldValidator.validate_email(email): print(f"'{email}' is a valid email address.") else: print(f"'{email}' is an invalid email address.")
Password Validation
password = "Password123!" confirm_password = "Password123!" valid, message = FieldValidator.validate_password(password, confirm_password) if valid: print("Password is valid.") else: print(f"Password is invalid: {message}")
Full Name Validation
full_name = "John Doe" if FieldValidator.validate_full_name(full_name): print(f"'{full_name}' is a valid full name.") else: print(f"'{full_name}' is an invalid full name.")
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
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 vehicle_form_validator-0.5.0.tar.gz.
File metadata
- Download URL: vehicle_form_validator-0.5.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
762bc58226e4833a6626c72b059aa070ae27145354348af0ce73f0202e767d90
|
|
| MD5 |
212b38568718760660883a9beabd9a8d
|
|
| BLAKE2b-256 |
bac44e1b93ad755324a5773167fcfc03444601747aeb645b3b3eddd079048bfd
|
File details
Details for the file vehicle_form_validator-0.5.0-py3-none-any.whl.
File metadata
- Download URL: vehicle_form_validator-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
976e53e20577bd781b32ffafb8503ab01fd12422b13736e0799d05e3e81e4036
|
|
| MD5 |
1f16a66e899bcc68add898377e080c33
|
|
| BLAKE2b-256 |
a7c9c901e9e275e8d312d99bfc685335a67d23f09f73fcd7508606a9a0ddacc9
|