Skip to content

0.12.2

Latest

Choose a tag to compare

@kolan72 kolan72 released this 14 Nov 13:57
· 23 commits to main since this release
  • 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.