Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IEnumerable<RuleViolation> GetRuleViolations()
- {
- if (String.IsNullOrEmpty(Name))
- yield return new RuleViolation("Name is Required", "Name");
- if (String.IsNullOrEmpty(Date.ToString()))
- yield return new RuleViolation("Date is Required", "Date");
- yield break;
- }
Add Comment
Please, Sign In to add comment