20) return true; return false; } public static function domain($str) { if (filter_var(gethostbyname($str), FILTER_VALIDATE_IP)) return true; return false; } public static function title($title) { if (strlen($title) > 0 && strlen($title) < 250) return true; return false; } public static function slug($str) { if(preg_match('/^[a-zA-Z\d_\- ]{1,100}$/i', $str)) return true; return false; } public static function url($url, $lazy = false) { if (($lazy && !$url) || !filter_var($url, FILTER_VALIDATE_URL) === false) return true; return false; } }