Tags

Tags give the ability to mark specific points in history as being important
  • 7.0.0

    protected Release: 7.0.0
  • 6.0.1

    protected Release: 6.0.1
    git push --set-upstream origin hotfix/nuget-project-url
  • 6.0.0

    protected
    64b29f0e · (#38) Lift to .NET 7 ·
    Release: 6.0.0
  • 5.0.1

    protected Release: 5.0.1
    Undo all nullability changes done for version 5.0.0. If you've upgraded to 5.0.0 already, you can simply undo your changes. Sorry!
    
    ## Changes
    
    * Remove nullability annotations for reference types
  • 5.0.0

    protected Release: 5.0.0
    # Changes
    
    - Enable nullability annotations for the whole package
    - `error`-parameter of `IAsserter<>.Check` is now `[NotNullWhen(false)] out ValidationError? error`
      * The attribute is part of the signature - if you implement that interface, you gotta add the attribute as well
    - `IsNotNull`-assertions are allowed for both nullable reference types and nullable value types
      * Most other validations are only allowed for non-nullable types, though - which can cause warnings since `IsNotNull` is not changing the asserted type (as it is not required to break on the first error)
      * To circumvent the "Hey it can be null even though you probably break on the IsNotNull-assertion"-warnings, you can use the following pattern:
    
    ```csharp
    Validator.Check()
      .That(myValue).IsNotNull()
      .That(myValue!).IsNotEmpty();
    ```
  • 4.2.0

    protected Release: 4.2.0
    ## Changes
    
    - Add overload for `IAssertable<string>.Matches()` accepting a `Regex` directly
    - Add new assertion `IAssertable<string>.IsNotOnlyWhitespace`
  • 4.1.1

    protected Release: 4.1.1
    ## Changes
    
    - Fix `IsLessThan` and `IsLessThanOrEqual` extensions to produce the correct error message
      * It falsely claimed "Foo must be greater than 1, but was 2." before - not it will correclty producte "Foo must be less than 1, but was 2."
  • 4.1.0

    protected Release: 4.1.0
    - Add assertion-overloads for all `DateTime` (like `IsAfter` or `IsUtc`) and comparison assertions (`IsLessThan`, `IsGreaterThan`, `IsInRange` and others)
      - These assertions will *always* fail for null values, except `IsNotEqualTo` - which will always pass for null values
  • 4.0.0

    protected
    b48d79bb · Fix release notes, oops ·
    Release: 4.0.0
    - Name of asserted value is now determined via `CallerArgumentExpression`-Attribute for overloads of `That()` accepting `T` and `Func<T>` (thanks Marco for that hint!)
      - When accepting a `Func<T>`, the `() =>`-part is removed from the displayed name
      - The name can still be overriden by passing a name explicitly
    - Overload of `That()` accepting an `Expression<Func<T>>` has been removed
    - `Validator.Check()` no longer returns a `Validator` directly but an `IValidation` instead
    - Extensions to the fluent grammar of `IValidation` have been moved from `Swallow.Validation.Core` to `Swallow.Validation.Assertions`
      - The namespace is still `Swallow.Validation`
      - Affected are overloads of `That`, `When`, `Unless`, `Satisfies` as well as `Then`, `Else` and `ElseThrow`
    - `ValidationContainer` has been moved from `Swallow.Validation.Core` to `Swallow.Validation.Assertions`
      - The namespace is still `Swallow.Validation`
    - Collection extensions (`IsNotEmpty`, `IsIn`, `IsNotIn`, `HasAll`, `HasAllValid`) have been moved from `Swallow.Validation.Assertions.Collections` to `Swallow.Validation.Assertions`
    - DateTime extensions (`IsBefore`, `IsAfter`, `IsBetween`, `isUtc`, `IsLocalTime`) have been moved from `Swallow.Validation.Assertions.DateTime` to `Swallow.Validation.Assertions`
    - Object extensions (`IsType`, `IsAssignableTo`) have been moved from `Swallow.Validation.Assertions.Types` to `Swallow.Validation.Assertions`
    - Validatable entity extensions (`IsValid`) have been moved from `Swallow.Validation.Assertions.Validatable` to `Swallow.Validation.Assertions`
    
    If you've only referenced `Swallow.Validation.Core` in your projects, you might need to start referencing `Swallow.Validation` instead - which includes both Core and `Swallow.Validation.Assertions`. If you're already referencing `Swallow.Validation`, you'll only need to adjust your usings.
    And you can finally drop all the `nameof()`s in your `That()`-calls, yay!
  • 3.1.0

    protected Release: 3.1.0
    Tired of providing an `INamedValueProvider` when calling `IAsserter`s yourself? Boy do I have a release for you.. something I should've done since I've done that change.
    
    # Changes
    * Adds new extensions for `IAsserter<>.Check` allowing you to call the method using either only a value or a value and a string as name for that value.
  • 3.0.0

    protected
    013a2334 · Fix typo... ·
    Release: 3.0.0
    * The `Swallow.Validation` package only contains the assertions extending `Swallow.Validation.Core` plus a package reference to `Swallow.Validation.Core`
    * A separate package for `Swallow.Validation.Core` is published, containing *only* the core
    * `Swallow.Validation.ServiceCollection` will now be version-locked to `Swallow.Validation.Core`
  • 2.0.0

    protected Release: 2.0.0
    # Breaking Changes
    - `IAsserter<TValue>`s `Check` method no longer accepts a `TValue` directly, but instead takes in an `INamedValueProvider<TValue>`
      - This affects the `ValidationContainer` as well!
    - `SimpleAsserter<TValue>`s `Validate` is now `protected` instead of `public`
    
    # Changes
    - When validating a list of values using `HasAll`, inner errors are now indented using two spaces and contain the name of the asserted value plus the index instead of just the index ([#28])
  • 1.5.0

    protected Release: 1.5.0
    Lift the package to .net 5
  • 1.4.0

    protected Release: 1.4.0
    Assertions to check types - for when the type system just isn't enough.
  • 1.3.0

    protected Release: 1.3.0
    Simple asserters, including documentation and a tiny fix for validation exceptions.
  • 1.2.0

    protected Release: 1.2.0
    Validation container 2.0 and collection element assertions
  • 1.1.1

    protected
    02322cc0 · Adjust for new url ·
    Release: 1.1.1
    Adjust the project-URLs.
  • 1.1.0

    protected Release: 1.1.0
    Introducing the ValidationContainer!
  • 1.0.0

    protected Release: 1.0.0
    1.0.0 Release
    
    Namespaces have changed, some stuff is internal, but no functional changes have happened since the last prerelease. Still, I have finished all tasks from the 1.0 milestone and I feel confident enough to release Swallow.Validation fully.
    
    Basically all extensions and errors have different namespaces now, so prepare for a lotta red when migrating.