public IEnumerable GetErrors(string propertyName) { if (string.IsNullOrEmpty(propertyName) || !ValidationMap.ContainsKey(propertyName)) { return(Enumerable.Empty <string>()); } return(ValidationMap[propertyName].Where(p => p.HasError).Select(p => p.Error)); }
public IEnumerable GetErrors(string propertyName) { if (string.IsNullOrEmpty(propertyName) || !ValidationMap.ContainsKey(propertyName)) { return(Enumerable.Empty <string>()); } Debug.WriteLine($"IDataError[{propertyName}]"); return(ValidationMap[propertyName].Where(b => b.HasError).Select(b => b.Error)); }