nestjs-custom-injector
class-validator
Our great sponsors
nestjs-custom-injector | class-validator | |
---|---|---|
2 | 18 | |
7 | 8,080 | |
- | 2.3% | |
5.6 | 8.7 | |
15 days ago | 5 days ago | |
TypeScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nestjs-custom-injector
-
Major version of nestjs-custom-injector: Exception if the provider is not set, use a promise in the default value and etc...
https://github.com/EndyKaufman/nestjs-custom-injector - Source code of library https://nestjs-custom-injector.site15.ru/api - Demo application with nestjs-custom-injector. https://github.com/EndyKaufman/nestjs-custom-injector-example - Example generated with nest cli.
-
Use abstract-class for custom injecting logic for NestJS with multi providing
https://nestjs-custom-injector.site15.ru/api/#/abstract-class - Demo application with nestjs-custom-injector. https://github.com/EndyKaufman/nestjs-custom-injector/tree/develop/apps/demo/src/app/abstract-class - Example.
class-validator
-
Validator in js
Package Feature Merit Demerit Link Zod TypeScript-first schema validation with static type inference Method chaining and easy to get ts type Newer package zod.dev joi This is almost same to zod Have many plugins Doesn't support static type inference https://github.com/sideway/joi Yup This is almost same to zod Have many plugins Missing some feature, function, deep object, promise... ... https://github.com/jquense/yup class-validator Validate class properties Have many features Code isn't clean https://github.com/typestack/class-validator ajv Validate by json scheme Enable to share schem to other languages Not supported typescript https://ajv.js.org/
- Why doesn’t TypeScript natively do any type checking
- Cursus NestJS - Validation via les DTO
-
`ls-enum`: list all possible values for a given enum at runtime
This is a little trick I pulled when doing this https://github.com/typestack/class-validator/pull/887, then I decided to write about it here https://stackrant.com/posts/typescript-enum-list-values. Now, since I've found myself using it in a lot of projects over the time, I decided to publish it, in case anybody else might find it useful. Feedback appreciated.
-
Rewrite Dynamic form group builder for Angular13+
As before, a fork is used to support error translations - https://github.com/EndyKaufman/class-validator-multi-lang (PR: https://github.com/typestack/class-validator/pull/743)
-
When can i start contributing to open source ?
After that I have recently gotten into contributing some code to a few projects that I use, class-validator and validator.js which are nice and simple to contribute to validators mostly follow a standardised format.
-
How to properly sanitise & check POST data from REST API? Which libraries can you suggest? best ways nowadays in 2022
I really enjoyed using class-transformer and class-validator for this.
-
How do you "stitch & glue" types for all your needs?
The class-validator / class-transform looks really nice for formatting/validation but there is also joi. suretype is attractive since theoretically typeconv could generate jsonSchema for json-schema-faker and Open API docs.
- Handling json input in an express app
-
How to implement value changes in interface?
There's also https://github.com/typestack/class-validator which is specifically for object validation.
What are some alternatives?
zod - TypeScript-first schema validation with static type inference
joi - The most powerful data validation library for JS
class-transformer - Decorator-based transformation, serialization, and deserialization between objects and classes.
io-ts - Runtime type system for IO decoding/encoding
TypeORM - ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
schema-builder - A typescript JSON Schema library that creates a schema and its type at the same time
openapi-typescript-validator - Generate typescript with ajv validation based on openapi schemas
typebox - JSON Schema Type Builder with Static Type Resolution for TypeScript
typescript-is
typedi - Simple yet powerful dependency injection tool for JavaScript and TypeScript.
FluentValidation - A popular .NET validation library for building strongly-typed validation rules.
Paste JSON as Code • quicktype - Xcode extension to paste JSON as Swift, Objective-C, and more