protected virtual IEnumerable <ValidationResult> ValidateReceiver(ValidationContext validationContext) { if (GroupId.IsNullOrWhiteSpace() && !ToUserId.HasValue) { yield return(new ValidationResult("")); } }