A simple data validation package
Project description
Personal Data Validator
Overview
Personal Data Validator is a Python package designed to efficiently validate various types of personal data, including:
- Email addresses
- Phone numbers
- Dates
- URLs
This package follows Object-Oriented Programming (OOP) principles, ensuring modularity, reusability, and easy integration into different projects.
Installation
Install the package using:
pip install datavalidator
Usage
1️⃣ Import the Validator Class
from datavalidator.validator import DataValidator
2️⃣ Validate an Email
data = "example@email.com"
validator = DataValidator(data)
print(validator.validate_email()) # Output: True
3️⃣ Validate a Phone Number
data = "+1-800-555-1234"
validator = DataValidator(data)
print(validator.validate_phone()) # Output: True
4️⃣ Validate a Date
data = "2024-03-14"
validator = DataValidator(data)
print(validator.validate_date()) # Output: True
5️⃣ Validate a URL
data = "https://example.com"
validator = DataValidator(data)
print(validator.validate_url()) # Output: True
Running Tests
The package includes unit tests to ensure proper functionality. Run tests using:
pytest tests/
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature-branch
- Commit your changes:
git commit -m "Added new feature"
- Push to the branch:
git push origin feature-branch
- Open a Pull Request
License
This project is licensed under the MIT License.
Author
👤 Oluwakorede Oyewole
📧 Email: damisonoyewole@gmail.com
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 korede_data_validator_tool-0.2.tar.gz.
File metadata
- Download URL: korede_data_validator_tool-0.2.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
258a40d26d95b13864204f5ceef8a62e9131e2e9c04251d804cff9a34150c259
|
|
| MD5 |
d99e7ecfc88ec74c6663e82144ea640e
|
|
| BLAKE2b-256 |
e2a0fd1f7efe403861168fdd45548b7c088bf7740f69e25e7a2bc9f6a275b6a6
|
File details
Details for the file korede_data_validator_tool-0.2-py3-none-any.whl.
File metadata
- Download URL: korede_data_validator_tool-0.2-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92559a6396b39944c2f3e98223710c85a66ab7d4346a7ffe5f7fff4cf13783fd
|
|
| MD5 |
6d060338f3a5a79506fe804b420018f3
|
|
| BLAKE2b-256 |
dc6662c671782e48ae2566cedbbf8a0c35e0bb81b4b5eab409987b4792abd797
|