protected function validateAnyOf($value, string $parameter, array $args = [], array $rules = null, array $context = null): ?string
    {
        if (count($args) == 0) {
            throw new ValidatorConfigException("Validator 'anyOf' must have at least one defined value; parameter={$parameter}");
        }

        if ($args[0] == '') {
            throw new ValidatorConfigException("Validator 'anyOf' must have non-empty string for argument; parameter={$parameter}");
        }

        foreach ($args as $i => $arg) {
            $args[$i] = urldecode(trim($arg));
        }

        //$value = $this->getValue($parameter);

        if ($value === null) {
            return null;
        }

        if (!is_scalar($value)) {
            return Message::getMessage(Message::PRIMITIVE, [
                'param' => $parameter
            ]);
        }

        $value = trim((string)$value);

        if ($value === '') {
            return null;
        }

        if (!in_array($value, $args)) {
            return Message::getMessage(Message::ANY_OF, [
                'param' => $parameter,
                'value' => $value,
                'allowedValues' => implode(', ', $args)
            ]);
        }

        return null;
    }