public static ValidationResult VerifyRawTags(PageViewModel pageViewModel, ValidationContext context)
{
if (string.IsNullOrEmpty(pageViewModel.RawTags))
return ValidationResult.Success;
if (_tagBlackList.Any(x => pageViewModel.RawTags.Contains(x)))
{
return new ValidationResult("Invalid characters in tag"); // doesn't need to be localized as there's a javascript check
}
else
{
return ValidationResult.Success;
}
}