Compiled Chronicles

A software development blog by Angelo Villegas

PHP: UPPEValidator

UPPEValidator is a simple PHP class that will help validate email addresses, URLs, passwords, and phone numbers. You can download the script in the link listed below.

UPPEValidator Download Link

Sample Usage :

$validator = new UPPEValidator();
$string = '09-088-909-8890'; // You can also use dots ( . ) instead of hyphens ( - )

if( $validator->is_phone( $string ) === true )
{
	echo 'success';
}
else
{
	echo 'failed';
}

Functions :

  • is_email()
  • is_url_string()
  • is_password()
  • is_phone()

Comments

Leave a Reply

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