Exemplo n.º 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));
        }
Exemplo n.º 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));
        }