File "Accepted.php"

Full Path: /home/attunedd/public_html/wp-content/plugins/wpide/vendor/rakit/validation/src/Rules/Accepted.php
File size: 511 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Rakit\Validation\Rules;

use Rakit\Validation\Rule;

class Accepted extends Rule
{
    /** @var bool */
    protected $implicit = true;

    /** @var string */
    protected $message = "The :attribute must be accepted";

    /**
     * Check the $value is accepted
     *
     * @param mixed $value
     * @return bool
     */
    public function check($value): bool
    {
        $acceptables = ['yes', 'on', '1', 1, true, 'true'];
        return in_array($value, $acceptables, true);
    }
}