data_validate
Overview
validate-data-pro 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 validate-data-pro==0.1
---
## **Usage**
### **1️⃣ Import the Validator Class**
```python
from validate-data-pro.validator import DATAVALIDATOR
2️⃣ Validate an Email
data = "example@email.com"
validator = DATAVALIDATOR(data)
print(validator.validate_email())
3️⃣ Validate a Phone Number
data = "+1-832-005-3034"
validator = DATAVALIDATOR(data)
print(validator.validate_phone())
To check if a number if froma particular contitnent , you can do this
data = "+234901245890"
validator = DATAVALIDATOR(data)
print(validator.african_numbers())
repeat for other continents by simply calling the method continentname_numbers()
4️⃣ Validate a Date
data = "2024-02-1123"
validator = DATAVALIDATOR(data)
print(validator.validate_date())
5️⃣ Validate a URL
data = "https://google.com"
validator = DATAVALIDATOR(data)
print(validator.validate_url())
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 featurebranch
- Commit your changes:
git commit -m "Added new feature"
- Push to the branch:
git push origin featurebranch
- Open a Pull Request
License
This project is licensed under the MIT License.
Author
👤 OKOLI OGECHUKWU ABIMBOLA
📧 Email: okoliogechi74@gmail.com
---# Data-Epic-data-validator-ogechukwu-okoli
data-validator-ogechukw-okoli