internal static void ValidatePlaceholder()

in src/Epam.Kafka/KafkaConfigExtensions.cs [172:186]


    internal static void ValidatePlaceholder(string key, string value)
    {
        Regex regex = RegexHelper.ConfigPlaceholderRegex;

        if (key == null || !regex.IsMatch(key))
        {
            throw new ArgumentException($"Placeholder key '{key}' not match '{regex}'.", nameof(key));
        }

        if (value == null || regex.IsMatch(value))
        {
            throw new ArgumentException($"Placeholder value '{value}' for key {key} is null or match '{regex}'.",
                nameof(value));
        }
    }