private void ValidateTemplateName() { ClearErrorInfo(nameof(TemplateName)); if (TemplateName.Any(c => Path.GetInvalidFileNameChars().Contains(c))) { AddErrorInfo(nameof(TemplateName), "Enter a valid name as file name."); } else if (CsvConfigFileManager.Default.SettingsList.Contains(TemplateName)) { AddErrorInfo(nameof(TemplateName), $"{TemplateName} is already exist."); } }