Repository navigation
Releases
0.1.2
A release for the package pages: npm and NuGet now describe the library as the cross-platform rules engine for validation that the repository README does. There are no code changes since 0.1.1.
| Package | Install | |
|---|---|---|
| TypeScript | ideablade-validation on npm |
npm i ideablade-validation@0.1.2 rxjs |
| .NET | IdeaBlade.Validation on NuGet |
dotnet add package IdeaBlade.Validation --version 0.1.2 |
What's changed since 0.1.1
- The npm README (#32) opens with the rules engine pitch, says why rules belong with the data rather than in forms, lists the features, compares the library briefly with Zod, and links the docs, the metadata editor and TempHire. The package description says the same.
- The NuGet description and README (#33) do the same, and link the npm package and the repository README.
- Both packages are tagged
rules-engine. - Docs: the editor prints the rules in plain English, and its installers are out (#30); TempHire notes updated for its detail tabs (#31).
git diff v0.1.1 v0.1.2 -- js/src dotnet/src is empty: the code is the same as 0.1.1.
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/coreand@angular/forms17.1 or later (22 for Signal Forms),react18 or later,breeze-client3. - 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, 6b8d388.
- npm still shows the deprecated
0.0.0-stageplaceholder from staged publishing. Install0.1.2.
Full changelog: v0.1.1...v0.1.2
0.1.1
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
requiredtakesallowEmptyString(#27), on both platforms. WithallowEmptyString: trueany string passes,''included, whilenull(andundefinedin TypeScript) still fails;trimthen 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'sflags,required'strimandallowEmptyString, and a description forexpression, so editors complete and check them. Their descriptions say whichpatternflags behave the same on the client and the server (#24, #25). Pin the schema withv0.1.1/spec/validation-metadata.schema.json. - Docs: corrected advice on the
u,gandypattern 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/coreand@angular/forms17.1 or later (22 for Signal Forms),react18 or later,breeze-client3. - 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-stageplaceholder from staged publishing. Install0.1.1.
Full changelog: v0.1.0...v0.1.1
0.1.0
The first release of IdeaBlade Validation: a data-store agnostic, metadata-driven validation framework for TypeScript and .NET. The rules for each type live in one JSON metadata document that the client and the server share, instead of being spread across the forms that edit it.
| Package | Install | |
|---|---|---|
| TypeScript | ideablade-validation on npm |
npm i ideablade-validation rxjs |
| .NET | IdeaBlade.Validation on NuGet |
dotnet add package IdeaBlade.Validation |
What's in it
- Rules in JSON metadata, per model type: property rules, model-level rules, groups, conditions,
extendsandfrominheritance, and a JSON Schema for editor support. The same metadata runs in the browser and on the server. - Sync and async validators, plugged in by name: Angular providers, React provider props, or .NET dependency injection.
- Continuous validation of whole entity stores, re-validated as entities change, including rules across entities (
store(type)). - A safe expression language, with no
eval: conditions and expressions run in a sandboxed interpreter that works under a strict Content Security Policy, with one grammar on both platforms. - Error visibility: a new record isn't all red before the user has done anything. Its first errors show once the user gets to a field, errors the user causes show at once, also across fields, and everything shows on a save attempt.
- Angular: standalone providers, signals, reactive and template-driven forms (
ideablade-validation/angular), and Signal Forms (ideablade-validation/angular/signal-forms). - React: hooks,
ValidationFormanduseFieldValidation(ideablade-validation/react). - Breeze 3: a ready-made integration in both directions (
ideablade-validation/breeze). Any other data layer plugs into the same public extension points.
Requirements
- npm: ESM only; Node.js 22 or later for server-side use. Peer dependencies:
rxjs ^7.4; optionally@angular/coreand@angular/forms17.1 or later (22 for Signal Forms),react18 or later,breeze-client3. - NuGet: .NET Standard 2.0, .NET 8 and .NET 10.
Documentation
Concepts · Metadata reference · Validators · Expressions · Angular · React · Breeze · .NET
TempHire uses it end to end, in an Angular and a React version that share one .NET server.
Notes
- As with any 0.x version, the API may still change between minor versions.
- The NuGet package was built from c38dacf, just before the npm package was renamed from
@ideablade/validationtoideablade-validation. Its description and README still name the npm package@ideablade/validation; the next NuGet version will carry the new name. The code is the same. - npm shows a deprecated
0.0.0-stageversion: a placeholder from npm's staged publishing. Install0.1.0.