Ejemplo n.º 1
0
        private void LogMaxLengthErrors(object entity)
        {
            var errors = MaxLengthValidator.GetErrors(entity);

            if (errors?.Count > 0)
            {
                foreach (var p in errors)
                {
                    Logger?.LogError($"Text too long in {p.Key}: " +
                                     $"{p.Value.Item2.Length} > {p.Value.Item1} max " +
                                     $"for \"{p.Value.Item2}\"");
                }
            }
        }