public void AddError(string message, string member) { member = StringExt.Get(member); if (!string.IsNullOrWhiteSpace(message)) { Errors.Add(message, member); } }
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); }