Skip to main content

A Django package to validate Egyptian phone numbers.

Project description

Egyptian Phone Validator

A Django package to validate Egyptian phone numbers.

Features

  • Validates Egyptian mobile phone numbers.

  • Ensures the phone number is exactly 11 digits long.

  • Checks for valid Egyptian mobile prefixes.

  • Raises ValidationError for invalid phone numbers.

  • Ensures the phone number is digits.

Installation

Install the package using pip:

pip install egyptian-phone-validator

Usage

from django.db import models
from egyptian_phone_validator.validators import validate_egyptian_phone_number

class UserProfile(models.Model):
    phone = models.CharField(
        max_length=11,
        validators=[validate_egyptian_phone_number],
        help_text="Enter a valid Egyptian phone number (e.g., 01012345678)."
    )

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

egyptian_phone_validator-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

egyptian_phone_validator-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file egyptian_phone_validator-0.1.1.tar.gz.

File metadata

File hashes

Hashes for egyptian_phone_validator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ef742e70678b9be38cb25938044ec121050277ffce0d933eea173ab1ecc27255
MD5 9ca85b4c2561b95df9bc2b5445d64b5f
BLAKE2b-256 49162619a50cfb8ecf05e960287d4310252c65200a4d31e00b9278c2aedb6c72

See more details on using hashes here.

File details

Details for the file egyptian_phone_validator-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for egyptian_phone_validator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e45150af2250c43d5b2a1abe3df07c2533fe6b8c31defb9b6c0a293ca233c8c1
MD5 a67fb8e72058247a42ed3884e1d2a55e
BLAKE2b-256 e398808c15da4afd39099255ed711181a7a56c458251ba177067cdf569f724ce

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