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
{