Пример #1
0
 public void AddError(string message, string member)
 {
     member = StringExt.Get(member);
     if (!string.IsNullOrWhiteSpace(message))
     {
         Errors.Add(message, member);
     }
 }
Пример #2
0
 public static List <ValidationModel> Add(this List <ValidationModel> obj, string message, string memberNames)
 {
     memberNames = StringExt.Get(memberNames);
     if (!string.IsNullOrWhiteSpace(message))
     {
         obj.Add(new ValidationModel(message, new string[] { memberNames }));
     }
     return(obj);
 }