A simple validation handler for PHP