Skip to content

Commit 0cab30a

Browse files
committed
Add What's New in 0.6.0 section and fix outdated validator description
- Add What's New in 0.6.0 section documenting breaking change and DRY refactoring - Fix Basic Usage Example text that incorrectly stated default validators enforce constraints
1 parent cbf3deb commit 0cab30a

2 files changed

Lines changed: 20 additions & 6 deletions

File tree

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
Valar is a validation library for Scala 3. It uses Scala 3's type system and inline metaprogramming to define validation
88
rules with minimal boilerplate, providing structured error messages for debugging or user feedback.
99

10+
## What's New in 0.6.0
11+
12+
* **Breaking Change**: Built-in validators for `Int`, `String`, `Float`, `Double` are now pass-through (accept all
13+
values). Constraints are opt-in via `ValidationHelpers`. See [MIGRATION.md](MIGRATION.md) for upgrade instructions.
14+
* **Internal DRY Refactoring**: Eliminated code duplication between `Validator` and `AsyncValidator` with an internal
15+
`F[_]` abstraction for better maintainability.
16+
* **Scala 3.7.4**: Upgraded to latest Scala with modern inline metaprogramming.
17+
1018
## What's New in 0.5.X
1119

1220
* **ValidationObserver**: A trait for observing validation outcomes without altering the flow. Useful for logging,
@@ -16,7 +24,6 @@ rules with minimal boilerplate, providing structured error messages for debuggin
1624
* **Enhanced ValarSuite**: Updated testing utilities in `valar-munit`.
1725
* **Reworked Derivation**: Uses modern Scala 3 inline metaprogramming for compile-time validation.
1826
* **MiMa Checks**: Binary compatibility verification between versions.
19-
* **Improved Documentation**: Updated scaladoc and module-level README files.
2027

2128
## Key Features
2229

@@ -146,8 +153,8 @@ libraryDependencies += "net.ghoula" %%% "valar-munit" % "0.6.0" % Test
146153

147154
## Basic Usage Example
148155

149-
Here's a basic example of validating a case class. Valar provides default validators for String (non-empty) and Int (
150-
non-negative).
156+
Here's a basic example of validating a case class with custom constraints. Built-in validators are pass-through by
157+
default, so you define the constraints you need.
151158

152159
```scala
153160
import net.ghoula.valar.*

docs-src/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
Valar is a validation library for Scala 3. It uses Scala 3's type system and inline metaprogramming to define validation
88
rules with minimal boilerplate, providing structured error messages for debugging or user feedback.
99

10+
## What's New in 0.6.0
11+
12+
* **Breaking Change**: Built-in validators for `Int`, `String`, `Float`, `Double` are now pass-through (accept all
13+
values). Constraints are opt-in via `ValidationHelpers`. See [MIGRATION.md](MIGRATION.md) for upgrade instructions.
14+
* **Internal DRY Refactoring**: Eliminated code duplication between `Validator` and `AsyncValidator` with an internal
15+
`F[_]` abstraction for better maintainability.
16+
* **Scala 3.7.4**: Upgraded to latest Scala with modern inline metaprogramming.
17+
1018
## What's New in 0.5.X
1119

1220
* **ValidationObserver**: A trait for observing validation outcomes without altering the flow. Useful for logging,
@@ -16,7 +24,6 @@ rules with minimal boilerplate, providing structured error messages for debuggin
1624
* **Enhanced ValarSuite**: Updated testing utilities in `valar-munit`.
1725
* **Reworked Derivation**: Uses modern Scala 3 inline metaprogramming for compile-time validation.
1826
* **MiMa Checks**: Binary compatibility verification between versions.
19-
* **Improved Documentation**: Updated scaladoc and module-level README files.
2027

2128
## Key Features
2229

@@ -146,8 +153,8 @@ libraryDependencies += "net.ghoula" %%% "valar-munit" % "0.6.0" % Test
146153

147154
## Basic Usage Example
148155

149-
Here's a basic example of validating a case class. Valar provides default validators for String (non-empty) and Int (
150-
non-negative).
156+
Here's a basic example of validating a case class with custom constraints. Built-in validators are pass-through by
157+
default, so you define the constraints you need.
151158

152159
```scala
153160
import net.ghoula.valar.*

0 commit comments

Comments
 (0)