npm fluentvalidation-ts 5.0.0
v5.0.0

3 months ago

v5.0.0 is a major release as it contains breaking changes that have been introduced to address issues #43 and #45 - read on for more information!

Breaking changes 💣

scalePrecision has changed to precisionScale ✏️

This change resolves #43.

The implementation of the (now removed) scalePrecision rule was incorrect, with the precision and scale parameters being mixed up. The new precisionScale method addresses this error and brings fluentvalidation-ts in line with both the naming used by FluentValidation and the ordering of arguments as they appear in SQL (see this issue for further information).

Check out the shiny new documentation page for .precisionScale for all the details.

Behaviour change for multiple when and/or unless calls in the same chain ⛓️‍💥

This change resolves #45.

Previously, a call to .when or .unless with the 'AppliesToAllValidators' option would add a condition to all rules in the current rule chain, regardless of the presence of other calls to .when and/or .unless. This behaviour was inconsistent with FluentValidation and made it necessary to define multiple rules chains to achieve the desired behaviour.

With this change, calling .when or .unless with the 'AppliesToAllValidators' option will add the specified condition to all rules in the current rule chain that follow the most recent call to .when or .unless.

Check out the updated documentation pages for a more detailed explanation and some examples:

Found a bug? 🐛

As always, if you spot any issues, please report them by raising an issue on GitHub.

Don't miss a new fluentvalidation-ts release

NewReleases is sending notifications on new releases.