Assert\Assertion::ipv4 PHP Метод

ipv4() публичный статический Метод

Assert that value is an IPv4 address (using input_filter/FILTER_VALIDATE_IP).
public static ipv4 ( string $value, null | integer $flag = null, string | null $message = null, string | null $propertyPath = null ) : boolean
$value string
$flag null | integer
$message string | null
$propertyPath string | null
Результат boolean
    public static function ipv4($value, $flag = null, $message = null, $propertyPath = null)
    {
        self::ip($value, $flag | FILTER_FLAG_IPV4, $message ?: 'Value "%s" was expected to be a valid IPv4 address.', $propertyPath);
        return true;
    }