Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Data Validator.

Features

  • 12 built-in validators: email, phone, URL, credit card (Luhn algorithm), IP address, date, password strength, slug, UUID, hex color, length, regex
  • Bulk validation: validate entire form submissions against a rules schema
  • Strict mode: tighter validation rules for production use
  • Disposable email detection: block temporary/throwaway email domains
  • JSON output: machine-readable validation results for API integration
  • Custom regex rules: define your own patterns via JSON rule files
  • Python 3.10+ stdlib only — no pip installs required

Quick Start

bash
# Validate a single email
python src/data_validator.py --email user@example.com

# Validate a phone number
python src/data_validator.py --phone "+1-555-123-4567"

# Validate a credit card (Luhn check)
python src/data_validator.py --credit-card 4111111111111111

# Validate a URL
python src/data_validator.py --url "https://api.example.com/v1/users"

# Bulk validate with rules
python src/data_validator.py --rules examples/validation_rules.json

# Run built-in demo
python src/data_validator.py --demo
Chapter 2

CLI Reference

Follow this guide to get Data Validator up and running in your environment.

CLI Reference

FlagDescription
--email VALUEValidate an email address
--phone VALUEValidate a phone number
--url VALUEValidate a URL
--credit-card VALUEValidate a credit card number (Luhn)
--ip VALUEValidate an IP address (v4 or v6)
--date VALUEValidate a date string
--password VALUECheck password strength
--slug VALUEValidate a URL slug
--uuid VALUEValidate a UUID
--color VALUEValidate a hex color code
--strictEnable strict validation mode
--jsonOutput results as JSON
--rules FILEBulk validate using a JSON rules file
--demoRun built-in validation demos

Validation Rules Schema

Define validation rules in JSON for bulk validation:

json
{
  "fields": {
    "email": {
      "value": "user@example.com",
      "rules": ["required", "email"]
    },
    "password": {
      "value": "MyS3cur3P@ss!",
      "rules": ["required", "password_strength", {"min_length": 8}]
    },
    "website": {
      "value": "https://example.com",
      "rules": ["url"]
    },
    "phone": {
      "value": "+15551234567",
      "rules": ["phone"]
    }
  }
}

Available Rule Types

RuleDescription
requiredField must not be empty
emailValid email format (RFC 5322 simplified)
phoneValid phone number (E.164 or loose format)
urlValid HTTP/HTTPS URL
credit_cardValid card number via Luhn algorithm
ip_addressValid IPv4 or IPv6 address
dateValid date string (multiple formats)
password_strengthPassword complexity check
slugURL-safe slug (lowercase, hyphens, no spaces)
uuidValid UUID v1-v5
hex_colorValid hex color (#RGB or #RRGGBB)
min_lengthMinimum character length
max_lengthMaximum character length
regexCustom regex pattern match
Chapter 3
🔒 Available in full product

Programmatic Usage

Chapter 4
🔒 Available in full product

File Structure

You’ve reached the end of the free preview

Get the full Data Validator and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $19 →
📦 Free sample included — download another copy for the full product.
Data Validator v1.0.0 — Free Preview