Skip to main content

A simple personal data validation package

Project description

Data Validator Package

This repository contains a simple data validator package built using python programming language. It is designed to validate personal data fields including email addresses, phone numbers, dates and URLs. It uses regular expressions and date parsing to ensure data correctness, making it easy to integrate data validation into your projects.

Features

  • Email Validation: This verifies that an email address conforms to the standard format.
  • Phone Number Validation: This validates phone numbers (supports international formats).
  • Date Validation:This checks that dates are in allowed formats (e.g., YYYY-MM-DD or DD/MM/YYYY) and that they represent valid calendar dates.
  • URL Validation: This confirms that a URL is properly formatted.

Installation

  • Clone the repository to your local machaine
  •   git clone https://github.com/Data-Epic/data-validator-Adenike-Awotunde.git
      cd Data_Validator_Package
    

Usage

Here's a quick example of how to use the Data Validator:

from Data_Validator_Package.data_validator import DataValidator

# Create an instance of DataValidator
validator = DataValidator()

# Set values
validator.set_email("awotundeadenike@outlook.com")
validator.set_phone_no("+2348012345678")
validator.set_date("1999-02-05")
validator.set_url("https://google.com")

# Validate data
if validator.validate_email():
    print("Email is valid.")
else:
    print("Email is invalid.")

Running Tests

This package uses pytest for unit testing. To run the tests, navigate to the Data_Validator_Test directory and run:

pytest

Contributing

Contributions to this package are welcome. To contribute, kindly:

  • Fork the repository.
  • Create a new branch.
  • Make your changes and commit them.
  • Push to the branch and create a pull request.

License

This project is licensed under the MIT License.

Contact

For questions or suggestions, please open an issue or contact adenikeisblessed@gmail.com

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

data_validator_package-0.1.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.

data_validator_package-0.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file data_validator_package-0.1.tar.gz.

File metadata

  • Download URL: data_validator_package-0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for data_validator_package-0.1.tar.gz
Algorithm Hash digest
SHA256 ba2ba06aaa96fd625c30347ef97c8a49f4f860f12645c6426f8031fe49e6eebd
MD5 e1dbba681b35b079f964070823cebdd8
BLAKE2b-256 d197aeaa441b1604a9cf51fe9a289830fea0186f5e8371049410302cc215890e

See more details on using hashes here.

File details

Details for the file data_validator_package-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for data_validator_package-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48888a295298481694ad6ac3c527f1929c0fcfd15d133432e73a956e7a1a40bf
MD5 4057bdc90c9aa192eed68ee939d3d906
BLAKE2b-256 7fb6e502b5bb122035a747282a500c4ac6b2ab8afbf309e72d19b6929756f20e

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