protected static function getEnumValidationRule(string $enumClass) : array
    {
        if (!is_a($enumClass, Enum::class, true)) {
            throw new \UnexpectedValueException('Class is not enum');
        }

        return array_merge(['in'], $enumClass::getConstants());
    }