Skip to content

Releases: mape1402/crabalidator

v1.0.4

Choose a tag to compare

@github-actions github-actions released this 11 Aug 18:51

Added

  • Added direct TestValidate(...) and TestValidateAsync(...) helpers for strongly typed validator tests.
  • Added CrabalidatorTestHost and builder APIs for DI-backed request validation in tests.
  • Added assembly discovery helpers for lightweight test hosts that validate requests without a full application host.
  • Documented direct request validator tests and lightweight test host usage for handlers and automations.

v1.0.3

Choose a tag to compare

@github-actions github-actions released this 07 Aug 21:35

Added

  • Added Crabalidator.Testing package for lightweight validator tests without a full application host.
  • Added AddCrabalidatorTesting(...) and AddCrabalidatorTestingAdapter(...) registration helpers.
  • Added direct validator test runner through CrabalidatorTest.For<TValidator>().
  • Added validation result assertions for valid results, property failures, error messages, error codes, severity, and multiple property errors.

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 06 Aug 23:05

Added

  • Built-in rule extension methods for strings, comparable values, collections, membership checks, defaults, and null/default checks in the base Crabalidator namespace.
  • BenchmarkDotNet coverage for built-in rule extensions against FluentValidation equivalents.
  • BenchmarkDotNet coverage for custom Must(...) predicates using public static, public instance, and fallback lambda delegates.
  • Explicit nested validator helpers through ValidateNestedWith<TValidator>(...) and ValidateEachWith<TValidator>(...).

Optimized

  • Optimized DynaBee generated validators to emit direct calls for visible Must(Func<TProperty, bool>) delegate methods.
  • Added fast-path support for public static Must predicates and public instance predicates with captured targets.
  • Updated built-in extension rules that require predicate state to use visible predicate methods so generated validators can avoid Delegate.Invoke.
  • Improved mixed extension-rule validation performance against FluentValidation baselines.

Fixed

  • Preserved property types when explicit nested validator helpers receive object-typed property expressions.
  • Allowed explicit nested validator selection without manually constructing validators, keeping dependency injection intact.
  • Kept opaque lambdas and private predicate methods on the safe fallback path.

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 22 Jul 16:31

Added

  • Inferred nested object validation through ValidateNested(...).
  • Inferred collection element validation through ValidateEach(...).
  • Type-based nested validator overloads for explicit validator selection without manual construction.

Fixed

  • Resolved inferred nested validators from dependency injection so child validators can use constructor dependencies and registered lifetimes.
  • Built DI validator plans with the active service provider for compiled validators and diagnostics.
  • Avoided manual new validator construction in samples, README snippets, and benchmark nested validation setup.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Jul 01:12

Added

  • Initial Crabalidator solution structure based on DynaBee.
  • Library, test, benchmark, sample, documentation, package, and CI scaffolding.
  • Stable NuGet package metadata, package icon, SourceLink, deterministic builds, symbols, and release workflow support.
  • Core validation model with validators, contexts, results, descriptors, diagnostics, and fluent rule configuration.
  • Public validation APIs through CrabValidator<T>, IValidator<T>, IAsyncValidator<T>, ICrabalidator, and ValidationResult.
  • Fluent RuleFor(...) rules for empty checks, length checks, comparisons, equality, and custom predicates.
  • Property-level When(...) and Unless(...) conditions.
  • Property cascade behavior through Cascade(CascadeMode.Stop).
  • Nested object validation through SetValidator(...).
  • Collection element validation through RuleForEach(...).
  • Async custom validation through MustAsync(...) with cancellation support.
  • Async nested validator execution.
  • Backend-neutral validation planning with rule order, failure metadata, diagnostics, and interpreted execution.
  • DynaBee sync generation backend with generated validator types, generated method bodies, compiled invokers, and registry caching.
  • DynaBee-generated hot paths for direct sync validation, typed property getters, typed rule checks, typed Must(...) delegates, conditions, nested validation, and collection validation.
  • Dependency injection registration through Microsoft.Extensions.DependencyInjection.
  • Validator discovery, compiled validator adapters, and the default Crabalidator runtime service.
  • Runtime diagnostics for registered validators and readable validation plan output through DescribePlan(...).
  • Basic console sample covering sync rules, conditions, nested validation, collection validation, async validation, and diagnostics.
  • BenchmarkDotNet scenarios for direct, interpreted, generated DI, nested, async, and delegate-heavy validation paths.
  • FluentValidation benchmark baselines for sync, nested, async, and delegate-heavy validation scenarios.

Optimized

  • Reduced context allocations in direct, DI, nested, and generated validation hot paths.
  • Inlined nested plan execution to avoid intermediate child ValidationResult allocations.
  • Avoided duplicate failure collection copies when plans produce invalid results.
  • Pre-sized validation failure collections from validation plan estimates.
  • Optimized generated invalid paths for common rule kinds and delegate predicates.

Notes

  • Crabalidator targets net8.0, net9.0, and net10.0.
  • DynaBee is an internal generation backend dependency and is not exposed through Crabalidator public APIs.
  • Validators that contain async rules must be executed with ValidateAsync(...).
  • NativeAOT/mobile-friendly generation is not part of this release.