File "AcceptedRule.php"
Full Path: /home/warrior1/public_html/languages/wp-content-20241001222009/plugins/file-manager/vendor/bitapps/wp-validator/src/Rules/AcceptedRule.php
File size: 401 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace BitApps\WPValidator\Rules;
use BitApps\WPValidator\Rule;
class AcceptedRule extends Rule
{
private $message = "The :attribute must be accepted";
public function validate($value)
{
$accepted = ['yes', 'on', '1', 1, true, 'true'];
return in_array($value, $accepted, true);
}
public function message()
{
return $this->message;
}
}