예제 #1
0
        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));
        }
예제 #2
0
        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));
        }