Skip to content

Releases: engineering87/SharpSanitizer

v3.0.0

25 Aug 22:02
d19a121

Choose a tag to compare

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.

v2.2.0

23 Aug 09:02
f44cacb

Choose a tag to compare

Bump to .NET 8

v2.1.0

09 May 16:58

Choose a tag to compare

Added ValidDatetime e ForceValidDateTime rules

v2.0.0

15 Jan 22:03

Choose a tag to compare

Update to .NET 6
Add decimal and double support

v1.0.0

15 Jan 14:19

Choose a tag to compare

Data Type supported:

  • Object
  • String
  • Integer

Rules supported:

  • NotNull
  • Max
  • MaxNotNull
  • Min
  • NotNegative
  • Uppercase
  • Lowercase
  • NoWhiteSpace
  • NoSpecialCharacters