prezine / human-validator
A smart PHP validator for real human data
Requires
- php: >=7.4
- giggsey/libphonenumber-for-php: ^8.12
Requires (Dev)
- phpunit/phpunit: ^12.2
This package is auto-updated.
Last update: 2026-03-26 07:42:14 UTC
README
A lightweight, modular PHP SDK that validates human-related input like names, emails, passwords, usernames, and phone numbers โ with intelligent logic beyond basic regex. Perfect for user signup, forms, and fraud prevention.
๐ Features
-
โ Name Validation
Detects whether a name looks human-like (not random gibberish), with optional dictionary support. -
๐ง Email Validation
Validates format, checks DNS MX records, and detects disposable or temporary email providers. -
๐ Password Validation
Enforces strong password rules and checks if passwords contain the user's name or email. -
๐ฑ Phone Number Validation
Validates international phone numbers using Google's libphonenumber for PHP. -
๐ค Username Validation
Enforces character limits, filters profanity, and restricts reserved usernames.
๐งช Installation
Require the package via Composer:
composer require prezine/php-human-validator