Skip to content

0.1.1

Choose a tag to compare

@marcelgood marcelgood released this 28 Nov 02:48
· 13 commits to main since this release
39009be

A patch release with one new validator option, plus a more complete metadata schema and docs.

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

What's changed since 0.1.0

  • required takes allowEmptyString (#27), on both platforms. With allowEmptyString: true any string passes, '' included, while null (and undefined in TypeScript) still fails; trim then has no effect. Use it for a string property that must be present but may be empty. See Validators.
  • The metadata schema lists more validator settings (#22, #27): pattern's flags, required's trim and allowEmptyString, and a description for expression, so editors complete and check them. Their descriptions say which pattern flags behave the same on the client and the server (#24, #25). Pin the schema with v0.1.1/spec/validation-metadata.schema.json.
  • Docs: corrected advice on the u, g and y pattern flags (#24, #25); the metadata editor (#23); and a README section on how this library compares with schema libraries such as Zod (#26).

No breaking changes: existing metadata validates exactly as it did in 0.1.0.

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, 39009be. The NuGet package's description and README now name the npm package ideablade-validation, which 0.1.0's still called @ideablade/validation.
  • npm still shows the deprecated 0.0.0-stage placeholder from staged publishing. Install 0.1.1.

Full changelog: v0.1.0...v0.1.1