30 references to ModelValidationResult
Microsoft.AspNetCore.Mvc.Core.Test (5)
Microsoft.AspNetCore.Mvc.DataAnnotations (4)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (21)
DataAnnotationsModelValidatorTest.cs (12)
65new ModelValidationResult(memberName: string.Empty, message: string.Empty),
272new[] { new ModelValidationResult(memberName: string.Empty, message: errorMessage) } },
276new[] { new ModelValidationResult(memberName: string.Empty, message: errorMessage) }
281new[] { new ModelValidationResult(memberName: string.Empty, message: errorMessage) }
286new[] { new ModelValidationResult(memberName: string.Empty, message: errorMessage) }
292new[] { new ModelValidationResult(memberName: string.Empty, message: errorMessage) }
297new[] { new ModelValidationResult(memberName: "AnotherName", message: errorMessage) }
302new[] { new ModelValidationResult(memberName: "[1]", message: errorMessage) }
309new ModelValidationResult(memberName: "Name1", message: errorMessage),
310new ModelValidationResult(memberName: "Name2", message: errorMessage),
318new ModelValidationResult(memberName: "[0]", message: errorMessage),
319new ModelValidationResult(memberName: "[2]", message: errorMessage),
ValidatableObjectAdapterTest.cs (9)
66new[] { new ModelValidationResult(memberName: null, message: "Error message") }
70new[] { new ModelValidationResult(nameof(SampleModel.FirstName), "Error message") }
82new ModelValidationResult(memberName: null, message: "Error message1"),
83new ModelValidationResult(nameof(SampleModel.FirstName), "Error message2"),
84new ModelValidationResult(nameof(SampleModel.LastName), "Error message3"),
86new ModelValidationResult(nameof(SampleModel), "Error message4"),
101new ModelValidationResult(nameof(SampleModel.FirstName), "Error message1"),
102new ModelValidationResult(nameof(SampleModel.LastName), "Error message1"),
103new ModelValidationResult(memberName: null, message: "Error message2"),