Repository navigation
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.