Skip to content

v3.0.0

Latest

Choose a tag to compare

@engineering87 engineering87 released this 25 Aug 22:02
· 5 commits to develop since this release
d19a121

This release introduces extended constraints, improved sanitization logic, updated documentation, and full support for .NET 9.

✨ New Features

  • New Constraints
    • NotNullOrEmpty → ensures strings are not null or empty.
    • NotNullOrWhiteSpace → ensures strings are not null or whitespace.
    • Positive → enforces values greater or equal to 0.
    • StrictPositive → enforces values strictly greater than 0.
    • NonZero → disallows zero values.
    • RoundTo → rounds numbers to a specified number of decimals.
    • NotEmptyCollection → ensures collections are not empty.
    • DistinctCollection → ensures collections contain distinct elements.

🔧 Improvements

  • Refactored sanitization logic with better handling for:
    • Numeric types (int, long, float, double, decimal)
    • String validation and normalization
    • Collections and objects (NotNull, NoDbNull, DistinctCollection)
  • Added stricter Strict vs Relaxed validation modes.

📚 Documentation

  • README.md improved with:
    • A Supported Constraints table in Markdown.

⚙️ Build & CI

  • Bumped target framework to .NET 9.
  • Updated GitHub Actions workflow (dotnet.yml) to run with .NET 9 SDK.
  • Verified builds, tests, and NuGet packaging under .NET 9.

✅ Testing

  • Extended unit test coverage for all new constraints.
  • Verified sanitization behavior across string, numeric, object, and collection types.
  • All tests passing successfully on .NET 9.