- Introduced validation failure for
nullroot instances instead of throwing FluentValidation exceptions. - Introduce abstract
ValidationProfile<T>class. - Added an optional
Action<T>onSuccessValidationparameter toExpressValidatorBuilder<TObj, TOptions>.AddFuncfor handling successful validation ofFuncresult. - Refactor
ExpressValidatorBuilder<TObj, TOptions>.Buildto remove dependency onExpressValidator<TObj, TOptions>. - Deprecate the
ExpressValidator<TObj, TOptions>class. - Add internal
PropertyValidationProcessor<TObj, T>class. - Switch to using
PropertyValidationProcessor<TObj, T>inExpressPropertyValidator<TObj, T>andExpressPropertyValidator<TObj, TOptions, T>. - Refactor
ExpressPropertyValidator<TObj, T>to setIsAsyncin the constructor. - Add internal utility
TypeHelper<T>class withIsNullmethod and use it inTypeValidatorBase<T>. - Introduce internal utility
TypeTraits<T>class. - Update to FluentValidation 12.1.1.
- Add internal static
ValidationFallbackProviderclass representing validation failure for anullinstance. - Add ExpressValidator.Tests.Net8.csproj for testing ExpressValidator when TargetFramework is net8.0.
- Update tests to System.ValueTuple 4.6.2.
- Improve test coverage for null handling.
- Update NuGet.md and README.md.
- Move the instance field
TypeValidatorBase._shouldBeComparedToNullto a static readonly field (renamed to_canBeNull) to cache the reflection result perTypeValidatorBase<T>type and eliminate redundant per-instance evaluations. - Remove the eagerly allocated
NotNullValidationMessageProviderduringExpressValidatorBuilderconfiguration, and instantiateNotNullValidationMessageProvider<object, T>only when the value is null. DeprecateNotNullValidationMessageProvider.GetMessage(ValidationContext<T>). - Update to FluentValidation 12.1.0.
- Rename private
TypeValidatorBase.HasOnlyNullOrEmptyValidatorstoHasNonEmptyValidators(inverting the boolean logic) and remove the negation of this property in theShouldValidatemethod. - 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
ExpressValidatordoes not throw when members are null and no null-related validators are used. - Edit README.md and NuGet.md.
- Support .NET 8.0 and FluentValidation 12.0.0.
- Fix
ExpressPropertyValidator<TObj, T>to prevent callingFunc<TObj, T>propertyFunc twice when a success handler is present. - Fix NU1504: Duplicate 'PackageReference' found
- Update NUnit NuGet package to v4.4.0.
- Add test for
ValidateAsyncwith bothWithValidationandWithAsyncValidationinExpressValidatorBuilder. - Add test to ensure synchronous Validate throws
AsyncValidatorInvokedSynchronouslyExceptionif the builder has async rules. - Add a test for the
ValidateAsyncmethod with simulated external services. - Add 'Asynchronous Validation' README Chapter.
- Introduced the
QuickValidator.ValidateAsync<T>(T, Action<IRuleBuilderOptions<T, T>>, string, Action<T>, CancellationToken)extension method. - Introduced the
QuickValidator.ValidateAsync<T>(T, Action<IRuleBuilderOptions<T, T>>, PropertyNameMode, Action<T>, CancellationToken)extension method. - Edit 'Quick Validation' README Chapter.
- Edit 'Quick Validation' NuGet README Chapter.
- Added quick validation support via
QuickValidatorand itsValidate<T>overloads. - Improve performance by applying options in
ExpressValidator<TObj, TOptions>during theExpressValidatorBuilder<TObj, TOptions>.Buildcall instead of at validation time. - Introduce the
Unitreadonly struct. - Add 'Nuances Of Using The Library' README Chapter.
- Add 'Nuances Of Using The Library' NuGet README Chapter.
- Add 'Quick Validation' README Chapter.
- Add 'Quick Validation' NuGet README Chapter.
- Introduced the
IExpressValidatorBuilder<TObj, TOptions>.BuildAndValidate<TObj, TOptions>(TObj, TOptions)extension method. - Introduced the
IExpressValidatorBuilder<TObj, TOptions>.BuildAndValidateAsync<TObj, TOptions>(TObj, TOptions, CancellationToken)extension method. - Introduced an optional
Action<T>parameter inExpressValidatorBuilder.AddFuncfor handling successfulFuncresult validation. - Remove
ConfigureAwait(false)in the loop where items are asynchronously added toList<ValidationFailure>as a precaution. - Add 'Modifying FluentValidation Validator Parameters Using Options' chapter in README.
- Introduce
IExpressValidatorBuilder<TObj>.BuildAndValidate(TObj obj)extension method. - Introduce
IExpressValidatorBuilder<TObj>.BuildAndValidateAsync(TObj, CancellationToken)extension method. - Remove unused internal
ExpressValidatorBuilder<TObj, TOptions>.Optionsproperty. - Made the
TObjparameter of theIExpressPropertyValidator<TObj, T>,IExpressPropertyValidator<in TObj, TOptions, T>interfaces contravariant. - Add doc comments to the
IExpressValidatorBuilder<TObj>interface. - Add doc comments to the
IExpressValidatorBuilder<TObj, TOptions>andExpressValidatorBuilder<TObj, TOptions>. - Add doc comments to the
IBuilderWithPropValidator<TObj, TOptions, T>andBuilderWithPropValidator<TObj, TOptions, T>. - Add documentation for the full API.
- Add documentation README Chapter.
- Change logo.
- Update to FluentValidation 11.11.0.
- Made the TOptions parameter of the
IObjectValidator<TObj, TOptions>contravariant. - Made the TObj parameter of the IObjectValidator,
IObjectValidator<TObj, TOptions>interfaces contravariant. - ExpressValidator codebase size reduced by moving
PropertyInfoToFuncConverterclass to bench project. - Unreference the Benchmark.csproj project from reference to the 'ExpressValidator.csproj' project.
- Add the Rider-related .gitignore.
- Remove unused using directives.
- Update Benchmark.csproj nuget packages.
- Update to FluentValidation 11.10.0.
- Fix warnings in tests.
- Update to NUnit 4.2.2.
- Extract
IExpressValidatorBuilder<TObj>interface. - Extract
IExpressValidatorBuilder<TObj, TOptions>interface.
- Introduce the possibility to dynamically change the parameters of the 'FluentValidation' validators. (via
ExpressValidatorBuilder<TObj, TOptions>,ExpressValidator<TObj, TOptions>classes). - Do not compare a non-nullable value type to null during pre-validation.
- Refactor adding object member to validate by introducing
MemberInfoParser.ParseProperty,MemberInfoParser.ParseFieldmethods. - Slightly improve performance by using
PropertyInfo.GetGetMethodto get a property from an object. - Add benchmark to get the fastest way to get
FuncfromPropertyInfo. - Remove redundant overload of the
PropertyInfo.GetTypedValueextension method. - Remove redundant
MemberInfoParser.TryParsemethod overload. - Update to 'FluentValidation' 11.9.2.
- 'NUnit3TestAdapter' from 4.5.0 to 4.6.0.
- Move builder-related classes to the new 'ValidatorBuilders' folder.
- Update README.md and NuGet README.
- Support validation for nullable value types.
- Slightly improved performance by removing the restriction on the type of instance to validate in the
TypeValidatorBase<T>.Prevalidatemethod. - Make
_nullMessageProvider,_propNameand_ruleTypeValidatorBase<T>class fields private instead of protected. - Remove
IExpressPropertyValidatorBaseinterface. - Remove redundant
ExpressPropertyValidatorconstructor.
- Introduce
ExpressValidatorBuilder.AddFuncmethod. - Update to FluentValidation 11.9.1.
- Made the
BuilderWithPropValidatorconstructor internal. - Add
TObjgeneric param toIExpressPropertyValidator,ExpressPropertyValidator.
- Support for adding a field for validation - introduced
ExpressValidatorBuilder.AddFieldmethod. - Made
IExpressPropertyValidatorBaseinternal. - Get rid of the
ExpressAsyncPropertyValidator,ExpressPropertyValidatorclasses, renameExpressPropertyValidatorBasetoExpressPropertyValidatorand use it in sync and async scenarios. - Remove the
BuilderWithPropValidator.PropertyValidatorproperty, make theExpressValidatorBuilderproperty private. - Move
IsAsyncproperty fromExpressValidatorstoTypeValidators.