protected function isAccepted(string $key) : bool
    {
        $allowed = ['yes', 'on', '1', 1, true, 'true'];

        if ($this->required($key) && in_array($this->param[$key], $allowed, true)) {
            return true;
        }

        $this->errors[$key.self::ERROR] = $this->convertToFieldName($key).' must be yes, on, 1, or true.';

        return false;
    }