Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ce645c6
Merge pull request #65 from kolan72/dev
kolan72 Nov 14, 2025
738ad9e
Package 0.12.2 version and update CHANGELOG.md.
kolan72 Nov 14, 2025
26652d0
Introduce the `ExpressConfigurator<T>` abstract class, add `IServiceC…
kolan72 Nov 23, 2025
88e434c
Merge pull request #66 from kolan72/main
kolan72 Nov 23, 2025
1d2dc54
Move `ExpressValidator.Extensions.DependencyInjection.Sample.csproj` …
kolan72 Nov 30, 2025
1343480
Provide an XML summary comment for the `AddExpressValidation` method.
kolan72 Dec 3, 2025
cc245c8
Add `ValidatorBuilderWithOptions.csproj` to the `ExpressValidator.Ext…
kolan72 Dec 4, 2025
d1c4c06
Rename `IExpressConfigurator<T>` to `IValidatorConfigurator<T>` and `…
kolan72 Dec 19, 2025
cde505a
Remove the `/complexguess` endpoint from the `QuickStart.csproj` proj…
kolan72 Dec 19, 2025
14d1151
Add `ConfiguratorDemo.csproj` to the `ExpressValidator.Extensions.Dep…
kolan72 Dec 21, 2025
6df01c9
Add `Shared.csproj` to the `ExpressValidator.Extensions.DependencyInj…
kolan72 Dec 28, 2025
88b2378
Split `ValidatorWithReload.csproj` from `QuickStart.csproj`.
kolan72 Jan 9, 2026
6d72402
Update to ExpressValidator 0.12.2 and FluentValidation 12.1.0.
kolan72 Jan 9, 2026
ac7da6f
Update ExpressValidator package for ExpressValidator.Extensions.Depen…
kolan72 Jan 9, 2026
d66c76e
Update Microsoft nuget packages.
kolan72 Jan 9, 2026
04cc7ed
Rename service names in `ValidatorBuilderWithOptions.csproj` and `Val…
kolan72 Jan 10, 2026
ebbbe2d
Move `GuessTheNumberService` to `Shared.csproj`.
kolan72 Jan 10, 2026
333b050
Remove the redundant `AddExpressValidation` call from `Program.Main` …
kolan72 Jan 10, 2026
c050fc6
Edit NuGet README.
kolan72 Jan 11, 2026
01a607a
Edit README.md.
kolan72 Jan 11, 2026
527758f
Edit Samples README.md.
kolan72 Jan 11, 2026
bc42f88
Edit 'Key Features' README chapter.
kolan72 Jan 11, 2026
d4d9f76
Merge pull request #67 from kolan72/dev-di
kolan72 Jan 13, 2026
7458722
Remove unnecessary using.
kolan72 Jan 13, 2026
ac4a88a
Package 0.4.0 version and update CHANGELOG.md.
kolan72 Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 0.12.2

- Move the instance field `TypeValidatorBase._shouldBeComparedToNull` to a static readonly field (renamed to `_canBeNull`) to cache the reflection result per `TypeValidatorBase<T>` type and eliminate redundant per-instance evaluations.
- Remove the eagerly allocated `NotNullValidationMessageProvider` during `ExpressValidatorBuilder` configuration, and instantiate `NotNullValidationMessageProvider<object, T>` only when the value is null.
Deprecate `NotNullValidationMessageProvider.GetMessage(ValidationContext<T>)`.
- Update to FluentValidation 12.1.0.
- Rename private `TypeValidatorBase.HasOnlyNullOrEmptyValidators` to `HasNonEmptyValidators` (inverting the boolean logic) and remove the negation of this property in the `ShouldValidate` method.
- DRY refactor of null validation in `TypeValidatorBase<T>`.
- Add tests for null-tolerance validation in `QuickValidator`.
- Add test for validating a primitive type using `ExpressValidatorBuilder`.
- Add a unit test that verifies `ExpressValidator` does not throw when members are null and no null-related validators are used.
- Edit README.md and NuGet.md.


## 0.12.0

- Support .NET 8.0 and FluentValidation 12.0.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

<ItemGroup>
<Content Remove="Properties\launchSettings.json" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\ExpressValidator.Extensions.DependencyInjection\ExpressValidator.Extensions.DependencyInjection.csproj" />
<ProjectReference Include="..\Shared\Shared.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="Properties\launchSettings.json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using ExpressValidator.Extensions.DependencyInjection;
using ExpressValidator;
using FluentValidation;
using Shared;

namespace ConfiguratorDemo
{
public class GuessValidatorConfigurator : ValidatorConfigurator<ObjToValidate>
{
public override void Configure(ExpressValidatorBuilder<ObjToValidate> expressValidatorBuilder)
=> expressValidatorBuilder
.AddProperty(o => o.I)
.WithValidation((o) => o.GreaterThan(5));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using ExpressValidator.Extensions.DependencyInjection;
using Shared;
using System.Reflection;

namespace ConfiguratorDemo
{
public static class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddExpressValidation(Assembly.GetExecutingAssembly());

builder.Services.AddTransient<IGuessTheNumberService, GuessTheNumberService>();

var app = builder.Build();

app.MapGet("/guess", (IGuessTheNumberService service) =>
{
var (Result, Message) = service.Guess();
if (!Result)
{
return Results.BadRequest(Message);
}
else
{
return Results.Ok(Message);
}
});

app.Run();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"profiles": {
"ConfiguratorDemo": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "guess",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:56889;http://localhost:56890"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,48 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExpressValidator.Extensions.DependencyInjection.Sample", "ExpressValidator.Extensions.DependencyInjection.Sample.csproj", "{C934656A-07B3-4909-9C4E-0DC71D2FD62F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExpressValidator.Extensions.DependencyInjection", "..\..\src\ExpressValidator.Extensions.DependencyInjection\ExpressValidator.Extensions.DependencyInjection.csproj", "{FF31B329-336C-47F0-BA60-55893A6FBCED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuickStart", "QuickStart\QuickStart.csproj", "{6C698590-8D21-5D95-CEA6-33121ACA75F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidatorBuilderWithOptions", "ValidatorBuilderWithOptions\ValidatorBuilderWithOptions.csproj", "{FC01EFE1-3E2D-48C7-9A5B-0F14E892F0C3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfiguratorDemo", "ConfiguratorDemo\ConfiguratorDemo.csproj", "{B7782C5A-65E8-4FB9-B0CF-4BC0657CB294}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{773987E2-48B5-4E06-A211-568C85655B72}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ValidatorWithReload", "ValidatorWithReload\ValidatorWithReload.csproj", "{2F1D27FB-7F89-4502-AEC9-50E1737769B7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C934656A-07B3-4909-9C4E-0DC71D2FD62F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C934656A-07B3-4909-9C4E-0DC71D2FD62F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C934656A-07B3-4909-9C4E-0DC71D2FD62F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C934656A-07B3-4909-9C4E-0DC71D2FD62F}.Release|Any CPU.Build.0 = Release|Any CPU
{FF31B329-336C-47F0-BA60-55893A6FBCED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF31B329-336C-47F0-BA60-55893A6FBCED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF31B329-336C-47F0-BA60-55893A6FBCED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF31B329-336C-47F0-BA60-55893A6FBCED}.Release|Any CPU.Build.0 = Release|Any CPU
{6C698590-8D21-5D95-CEA6-33121ACA75F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C698590-8D21-5D95-CEA6-33121ACA75F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C698590-8D21-5D95-CEA6-33121ACA75F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C698590-8D21-5D95-CEA6-33121ACA75F1}.Release|Any CPU.Build.0 = Release|Any CPU
{FC01EFE1-3E2D-48C7-9A5B-0F14E892F0C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC01EFE1-3E2D-48C7-9A5B-0F14E892F0C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC01EFE1-3E2D-48C7-9A5B-0F14E892F0C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC01EFE1-3E2D-48C7-9A5B-0F14E892F0C3}.Release|Any CPU.Build.0 = Release|Any CPU
{B7782C5A-65E8-4FB9-B0CF-4BC0657CB294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7782C5A-65E8-4FB9-B0CF-4BC0657CB294}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7782C5A-65E8-4FB9-B0CF-4BC0657CB294}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7782C5A-65E8-4FB9-B0CF-4BC0657CB294}.Release|Any CPU.Build.0 = Release|Any CPU
{773987E2-48B5-4E06-A211-568C85655B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{773987E2-48B5-4E06-A211-568C85655B72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{773987E2-48B5-4E06-A211-568C85655B72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{773987E2-48B5-4E06-A211-568C85655B72}.Release|Any CPU.Build.0 = Release|Any CPU
{2F1D27FB-7F89-4502-AEC9-50E1737769B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F1D27FB-7F89-4502-AEC9-50E1737769B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F1D27FB-7F89-4502-AEC9-50E1737769B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F1D27FB-7F89-4502-AEC9-50E1737769B7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

This file was deleted.

Loading