PHP Data Validator (Database Abstractions)

A quick and easy to use utility to validate all sorts of data for your PHP website. All validation methods are static thus dramatically improving validation speed and performance:

Validation Features Include:

  • Is Alphanumeric Value
  • Is Alpha Value
  • Is Upper Case String
  • Is Numeric Value
  • Is Floating Point Value
  • Is Date/Time String
  • Is Email String
  • Is Phone Number String
  • Is UTF8 String
  • Is Social Security Number
  • Is Valid URL
  • Is Valid Existing URL
  • Is a Hex Color Code
  • Is an RGB Color Code
  • Is a Number between 2 numbers
  • Is an array of unique elements
  • Is a valid File
  • Is a file below a max file size below max size

Easy Code Setup and Usage:

Set Up

require ‘DataValidator.php’;

Validate Alpha Numeric String


Validate Hexadecimal Color Code


Validate Email Address

DataValidator::isEmail(‘[email protected]’);

Validate File Size

DataValidator::isBelowMaxFileSize(’./foo.php’, 23);

Download PHP Data Validator (Database Abstractions)

Leave a Reply

Your email address will not be published. Required fields are marked *