public function validateEnum(Model $model, $check, $rule) {
        $field = key($check);
        $value = $check[$field];

        if ($value === '' || $value === null || $value === false) {
            return (bool) $rule['allowEmpty'];
        }

        $enum = $this->enum($model, $field);

        return isset($enum[$value]);
    }