Skip to main content

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:

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature-branch
    
  3. Commit your changes:
    git commit -m "Added new feature"
    
  4. Push to the branch:
    git push origin feature-branch
    
  5. Open a Pull Request

License

This project is licensed under the MIT License.


Author

👤 Oluwakorede Oyewole
📧 Email: damisonoyewole@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

korede_data_validator_tool-0.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

korede_data_validator_tool-0.2-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file korede_data_validator_tool-0.2.tar.gz.

File metadata

File hashes

Hashes for korede_data_validator_tool-0.2.tar.gz
Algorithm Hash digest
SHA256 258a40d26d95b13864204f5ceef8a62e9131e2e9c04251d804cff9a34150c259
MD5 d99e7ecfc88ec74c6663e82144ea640e
BLAKE2b-256 e2a0fd1f7efe403861168fdd45548b7c088bf7740f69e25e7a2bc9f6a275b6a6

See more details on using hashes here.

File details

Details for the file korede_data_validator_tool-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for korede_data_validator_tool-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92559a6396b39944c2f3e98223710c85a66ab7d4346a7ffe5f7fff4cf13783fd
MD5 6d060338f3a5a79506fe804b420018f3
BLAKE2b-256 dc6662c671782e48ae2566cedbbf8a0c35e0bb81b4b5eab409987b4792abd797

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