a scrappy PHP validator class.