added callbacks for PHP's filter validation