File "IP6Rule.php"

Full Path: /home/warrior1/public_html/languages/wp-content-20241001222009/plugins/file-manager/vendor/bitapps/wp-validator/src/Rules/IP6Rule.php
File size: 383 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
namespace BitApps\WPValidator\Rules;

use BitApps\WPValidator\Rule;

class IP6Rule extends Rule
{
    private $message = "The :attribute must be a valid IPv6 address";

    public function validate($value)
    {
        return filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false;
    }

    public function message()
    {
        return $this->message;
    }
}