/// <inheritdoc/> public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { if (ModelName.AsFileName(false) != ModelName) { yield return(new ValidationResult("ModelName contains characters invalid in a filename.")); } }