Skip to content

0.2.1

Latest

Choose a tag to compare

@marcelgood marcelgood released this 04 Dec 07:51
· 10 commits to main since this release
d0ecefd

A fix for Angular's template-driven forms: a new record after a save is no longer red.

Package Install
TypeScript ideablade-validation on npm npm i ideablade-validation@0.2.1 rxjs
.NET IdeaBlade.Validation on NuGet dotnet add package IdeaBlade.Validation --version 0.2.1

What's changed since 0.2.0

  • Angular: a field typed into no longer counts as touched on the next model (#38). When a template-driven form's [validationModel] moved on to another model, the form cleared its controls' touched and dirty flags, but its own touch listener took the events that clearing emits while a control was still dirty. Every field the user had typed into then counted as touched on the new model, which showed those fields' errors at once: fill in a form, Save, start a new record, and it was red. Fields that were only left (not typed into) were already handled. The events still go out, for anything else that follows the controls.
  • React docs: reset the visibility when moving on to another record (#38). useValidation takes a different model object between renders to be the same model, edited (the copies useState makes), so a new record took over the fields touched on the previous one. Call visibility.reset() in the handler that sets the new record: Showing errors. The library's behaviour is unchanged.
  • .NET: no changes. The package is 0.2.1 so both packages keep matching versions.

Requirements

Unchanged from 0.1.0:

  • npm: ESM only; Node.js 22 or later for server-side use. Peer dependencies: rxjs ^7.4; optionally @angular/core and @angular/forms 17.1 or later (22 for Signal Forms), react 18 or later, breeze-client 3.
  • NuGet: .NET Standard 2.0, .NET 8 and .NET 10.

Documentation

Concepts · Metadata reference · Validators · Expressions · Angular · React · Breeze · .NET

Notes

  • Both packages were built from the tagged commit, d0ecefd.
  • npm still shows the deprecated 0.0.0-stage placeholder from staged publishing. Install 0.2.1.

Full changelog: v0.2.0...v0.2.1