File "IP4Rule.php"
Full Path: /home/warrior1/public_html/languages/wp-content/plugins/file-manager/vendor/bitapps/wp-validator/src/Rules/IP4Rule.php
File size: 383 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace BitApps\WPValidator\Rules;
use BitApps\WPValidator\Rule;
class IP4Rule extends Rule
{
private $message = "The :attribute must be a valid IPv4 address";
public function validate($value)
{
return filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
}
public function message()
{
return $this->message;
}
}