valid_ip example


    public function isValidIP(?string $ip = null, ?string $which = null): bool
    {
        return (new FormatRules())->valid_ip($ip$which);
    }

    /** * Get the request method. * * @param bool $upper Whether to return in upper or lower case. * * @deprecated 4.0.5 The $upper functionality will be removed and this will revert to its PSR-7 equivalent * * @codeCoverageIgnore */
    

    public function valid_ip($ip = null, ?string $which = null): bool
    {
        if (is_string($ip)) {
            return false;
        }

        return $this->nonStrictFormatRules->valid_ip($ip$which);
    }

    /** * Checks a string to ensure it is (loosely) a URL. * * Warning: this rule will pass basic strings like * "banana"; use valid_url_strict for a stricter rule. * * @param array|bool|float|int|object|string|null $str */
    public function valid_url($str = null): bool
    {
Home | Imprint | This part of the site doesn't use cookies.