80 instantiations of ValidationResult
BasketService (1)
FormatterWebSite (1)
Microsoft.AspNetCore.Mvc.Core.Test (7)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (9)
ValidatableObjectAdapterTest.cs (8)
65new[] { new ValidationResult("Error message") },
69new[] { new ValidationResult("Error message", new[] { nameof(SampleModel.FirstName) }) },
75new ValidationResult("Error message1"),
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[]
97new ValidationResult("Error message2"),
Microsoft.AspNetCore.Mvc.IntegrationTests (18)
Microsoft.Extensions.Compliance.Redaction (6)
Microsoft.Extensions.Diagnostics.Probes (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
Microsoft.Extensions.Http.Resilience (6)
Microsoft.Extensions.Telemetry (6)
MyFrontend (1)
OrderProcessor (1)
Shared (6)
System.ComponentModel.Annotations (6)
183 references to ValidationResult
BasketService (2)
FormatterWebSite (3)
Microsoft.AspNetCore.Components.Forms (4)
Microsoft.AspNetCore.Mvc.Core.Test (7)
Microsoft.AspNetCore.Mvc.DataAnnotations (4)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (12)
Microsoft.AspNetCore.Mvc.IntegrationTests (19)
Microsoft.Extensions.Compliance.Redaction (7)
Microsoft.Extensions.Diagnostics.Probes (7)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (7)
Microsoft.Extensions.Http.Resilience (7)
Microsoft.Extensions.Options (5)
Microsoft.Extensions.Options.DataAnnotations (5)
Microsoft.Extensions.Telemetry (7)
MyFrontend (2)
OrderProcessor (2)
Shared (7)
Shared.Tests (16)
System.ComponentModel.Annotations (59)
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (17)
298private protected ValidationResult CreateFailedValidationResult(ValidationContext validationContext)
364return IsValid(value, null!) == ValidationResult.Success;
379/// When validation is valid, <see cref="ValidationResult.Success" />.
381/// When validation is invalid, an instance of <see cref="ValidationResult" />.
389protected virtual ValidationResult? IsValid(object? value, ValidationContext validationContext)
400? ValidationResult.Success
409/// If this method returns <see cref="ValidationResult.Success" />, then validation was successful, otherwise
410/// an instance of <see cref="ValidationResult" /> will be returned with a guaranteed non-null
411/// <see cref="ValidationResult.ErrorMessage" />.
419/// When validation is valid, <see cref="ValidationResult.Success" />.
421/// When validation is invalid, an instance of <see cref="ValidationResult" />.
430public ValidationResult? GetValidationResult(object? value, ValidationContext validationContext)
434var result = IsValid(value, validationContext);
483/// If that method doesn't return <see cref="ValidationResult.Success" />, this base method will throw
484/// a <see cref="ValidationException" /> containing the <see cref="ValidationResult" /> describing the problem.
490/// doesn't return <see cref="ValidationResult.Success" />.
501ValidationResult? result = GetValidationResult(value, validationContext);
System.ComponentModel.DataAnnotations (1)