55 references to ValidationResult
BasketService (1)
Models\BasketItem.cs (1)
19results.Add(new ValidationResult("Invalid number of units", new[] { "Quantity" }));
Microsoft.AspNetCore.Mvc.Core.Test (5)
ModelBinding\Validation\DefaultObjectValidatorTests.cs (5)
1545yield return new ValidationResult( 1548yield return new ValidationResult("Error2", new[] { "Property1" }); 1549yield return new ValidationResult("Error3", new[] { "Property2", "Property3" }); 1626return new ValidationResult( 1644return new ValidationResult(
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (6)
DataAnnotationsModelValidatorTest.cs (1)
341.Returns(new ValidationResult(errorMessage, memberNames));
ValidatableObjectAdapterTest.cs (5)
69new[] { new ValidationResult("Error message", new[] { nameof(SampleModel.FirstName) }) }, 76new ValidationResult("Error message2", new[] { nameof(SampleModel.FirstName) }), 77new ValidationResult("Error message3", new[] { nameof(SampleModel.LastName) }), 78new ValidationResult("Error message4", new[] { nameof(SampleModel) }), 92new ValidationResult("Error message1", new[]
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ActionParametersIntegrationTest.cs (1)
899yield return new ValidationResult("FirstName Not valid.", new string[] { nameof(FirstName) });
Microsoft.Extensions.Compliance.Redaction (6)
src\Shared\Data.Validation\LengthAttribute.cs (2)
175return new ValidationResult(FormatErrorMessage(validationContext.GetDisplayName()), validationContext.GetMemberName()); 184return new ValidationResult(validationMessage, validationContext.GetMemberName());
src\Shared\Data.Validation\TimeSpanAttribute.cs (4)
134return new ValidationResult($"The field {validationContext.GetDisplayName()} must be > to {min}.", validationContext.GetMemberName()); 139return new ValidationResult($"The field {validationContext.GetDisplayName()} must be >= to {min}.", validationContext.GetMemberName()); 146return new ValidationResult($"The field {validationContext.GetDisplayName()} must be < to {max}.", validationContext.GetMemberName()); 151return new ValidationResult($"The field {validationContext.GetDisplayName()} must be <= to {max}.", validationContext.GetMemberName());
Microsoft.Extensions.Diagnostics.Probes (6)
src\Shared\Data.Validation\LengthAttribute.cs (2)
175return new ValidationResult(FormatErrorMessage(validationContext.GetDisplayName()), validationContext.GetMemberName()); 184return new ValidationResult(validationMessage, validationContext.GetMemberName());
src\Shared\Data.Validation\TimeSpanAttribute.cs (4)
134return new ValidationResult($"The field {validationContext.GetDisplayName()} must be > to {min}.", validationContext.GetMemberName()); 139return new ValidationResult($"The field {validationContext.GetDisplayName()} must be >= to {min}.", validationContext.GetMemberName()); 146return new ValidationResult($"The field {validationContext.GetDisplayName()} must be < to {max}.", validationContext.GetMemberName()); 151return new ValidationResult($"The field {validationContext.GetDisplayName()} must be <= to {max}.", validationContext.GetMemberName());
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
src\Shared\Data.Validation\LengthAttribute.cs (2)
175return new ValidationResult(FormatErrorMessage(validationContext.GetDisplayName()), validationContext.GetMemberName()); 184return new ValidationResult(validationMessage, validationContext.GetMemberName());
src\Shared\Data.Validation\TimeSpanAttribute.cs (4)
134return new ValidationResult($"The field {validationContext.GetDisplayName()} must be > to {min}.", validationContext.GetMemberName()); 139return new ValidationResult($"The field {validationContext.GetDisplayName()} must be >= to {min}.", validationContext.GetMemberName()); 146return new ValidationResult($"The field {validationContext.GetDisplayName()} must be < to {max}.", validationContext.GetMemberName()); 151return new ValidationResult($"The field {validationContext.GetDisplayName()} must be <= to {max}.", validationContext.GetMemberName());
Microsoft.Extensions.Http.Resilience (6)
src\Shared\Data.Validation\LengthAttribute.cs (2)
175return new ValidationResult(FormatErrorMessage(validationContext.GetDisplayName()), validationContext.GetMemberName()); 184return new ValidationResult(validationMessage, validationContext.GetMemberName());
src\Shared\Data.Validation\TimeSpanAttribute.cs (4)
134return new ValidationResult($"The field {validationContext.GetDisplayName()} must be > to {min}.", validationContext.GetMemberName()); 139return new ValidationResult($"The field {validationContext.GetDisplayName()} must be >= to {min}.", validationContext.GetMemberName()); 146return new ValidationResult($"The field {validationContext.GetDisplayName()} must be < to {max}.", validationContext.GetMemberName()); 151return new ValidationResult($"The field {validationContext.GetDisplayName()} must be <= to {max}.", validationContext.GetMemberName());
Microsoft.Extensions.Telemetry (6)
src\Shared\Data.Validation\LengthAttribute.cs (2)
175return new ValidationResult(FormatErrorMessage(validationContext.GetDisplayName()), validationContext.GetMemberName()); 184return new ValidationResult(validationMessage, validationContext.GetMemberName());
src\Shared\Data.Validation\TimeSpanAttribute.cs (4)
134return new ValidationResult($"The field {validationContext.GetDisplayName()} must be > to {min}.", validationContext.GetMemberName()); 139return new ValidationResult($"The field {validationContext.GetDisplayName()} must be >= to {min}.", validationContext.GetMemberName()); 146return new ValidationResult($"The field {validationContext.GetDisplayName()} must be < to {max}.", validationContext.GetMemberName()); 151return new ValidationResult($"The field {validationContext.GetDisplayName()} must be <= to {max}.", validationContext.GetMemberName());
MyFrontend (1)
playground\TestShop\BasketService\Models\BasketItem.cs (1)
19results.Add(new ValidationResult("Invalid number of units", new[] { "Quantity" }));
OrderProcessor (1)
playground\TestShop\BasketService\Models\BasketItem.cs (1)
19results.Add(new ValidationResult("Invalid number of units", new[] { "Quantity" }));
Shared (6)
Data.Validation\LengthAttribute.cs (2)
175return new ValidationResult(FormatErrorMessage(validationContext.GetDisplayName()), validationContext.GetMemberName()); 184return new ValidationResult(validationMessage, validationContext.GetMemberName());
Data.Validation\TimeSpanAttribute.cs (4)
134return new ValidationResult($"The field {validationContext.GetDisplayName()} must be > to {min}.", validationContext.GetMemberName()); 139return new ValidationResult($"The field {validationContext.GetDisplayName()} must be >= to {min}.", validationContext.GetMemberName()); 146return new ValidationResult($"The field {validationContext.GetDisplayName()} must be < to {max}.", validationContext.GetMemberName()); 151return new ValidationResult($"The field {validationContext.GetDisplayName()} must be <= to {max}.", validationContext.GetMemberName());
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\CompareAttribute.cs (1)
56return new ValidationResult(FormatErrorMessage(validationContext.DisplayName), memberNames);
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (2)
304return new ValidationResult(FormatErrorMessage(validationContext.DisplayName), memberNames); 442result = new ValidationResult(errorMessage, result.MemberNames);
System\ComponentModel\DataAnnotations\ValidationResult.cs (1)
41: this(errorMessage, null)