2 writes to MemberNames
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\ValidationResult.cs (2)
60MemberNames = memberNames ?? Array.Empty<string>(); 73MemberNames = validationResult.MemberNames;
34 references to MemberNames
Microsoft.AspNetCore.Components.Forms (1)
EditContextDataAnnotationsExtensions.cs (1)
126foreach (var memberName in validationResult.MemberNames)
Microsoft.AspNetCore.Mvc.DataAnnotations (5)
DataAnnotationsModelValidator.cs (2)
100if (result.MemberNames != null) 102foreach (var resultMemberName in result.MemberNames)
ValidatableObjectAdapter.cs (3)
51if (result.MemberNames == null || !result.MemberNames.Any()) 57foreach (var memberName in result.MemberNames)
Microsoft.Extensions.Options (1)
ValidateOptionsResultBuilder.cs (1)
46string joinedMembers = string.Join(MemberSeparatorString, result.MemberNames);
Microsoft.Extensions.Options.DataAnnotations (1)
DataAnnotationValidateOptions.cs (1)
92errors.Add($"DataAnnotation validation failed for '{qualifiedName}' members: '{string.Join(",", result.MemberNames)}' with the error: '{result.ErrorMessage}'.");
Shared.Tests (24)
Data.Validation\LengthAttributeTests.cs (13)
41Assert.Contains(nameof(options.Name), results[0].MemberNames); 55Assert.Contains(nameof(options.Address), results[0].MemberNames); 62Assert.Contains(nameof(options.Address), results[0].MemberNames); 97Assert.Contains(nameof(options.Name), results[0].MemberNames); 111Assert.Contains(nameof(options.Address), results[0].MemberNames); 119Assert.Contains(nameof(options.Address), results[0].MemberNames); 170Assert.Contains(nameof(options.Names), results[0].MemberNames); 188Assert.Contains(nameof(options.Addresses), results[0].MemberNames); 224Assert.Contains(nameof(options.Names), results[0].MemberNames); 236Assert.Contains(nameof(options.Addresses), results[0].MemberNames); 277Assert.Contains(nameof(options.Names), results[0].MemberNames); 295Assert.Contains(nameof(options.Addresses), results[0].MemberNames); 376Assert.Empty(result!.MemberNames);
Data.Validation\TimeSpanAttributeTests.cs (11)
39Assert.Contains(nameof(options.Time), results[0].MemberNames); 46Assert.Contains(nameof(options.Time), results[0].MemberNames); 64Assert.Contains(nameof(options.Time2), results[0].MemberNames); 104Assert.Contains(nameof(options.Time), results[0].MemberNames); 111Assert.Contains(nameof(options.Time), results[0].MemberNames); 125Assert.Contains(nameof(options.Time2), results[0].MemberNames); 132Assert.Contains(nameof(options.Time2), results[0].MemberNames); 167Assert.Contains(nameof(options.Time), results[0].MemberNames); 174Assert.Contains(nameof(options.Time), results[0].MemberNames); 192Assert.Contains(nameof(options.Time2), results[0].MemberNames); 253Assert.Empty(result!.MemberNames);
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
442result = new ValidationResult(errorMessage, result.MemberNames);
System\ComponentModel\DataAnnotations\ValidationResult.cs (1)
73MemberNames = validationResult.MemberNames;