class-validator
class-validator copied to clipboard
Decorator-based property validation for classes.
**I was trying to...** Allow only an array of objects to be passed on a given property **The problem:** `ValidateNested` allows both objects and arrays, making it possible to pass...
### Description Use Class-Validator in DTOs **Minimal code-snippet showcasing the problem** ```ts @isNotEmpty({ message: '' }) // ts error @ApiProperty({ description: '手机号', example: '13222222222', required: true }) phone: number; ```...
## Description Applied trim on enum string to removed unnecessary white space for @IsEnum() decorator. ## Checklist - [x] the pull request title describes what this PR does (not a...
Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.21.0. Release notes Sourced from eslint's releases. v8.21.0 Features 7b43ea1 feat: Implement FlatESLint (#16149) (Nicholas C. Zakas) 92bf49a feat: improve the key width calculation in...
### Description Its necessary create BingInt validator. This validator its necessary allow string or numbers, its necessary because its posible that existe BigInt type: * - "20221301083605n" * - "20221301083605"...
### Description _I'm using NestJS, there I have validations which are done through this library._ I have decorated a class property with `@Matches` with a regex which has `ug` flags....
### Description Can we get IsCronExpression decorator? ### Proposed solution You can use this package to validate the cron expression under the hood or a well written regular expression https://github.com/TheCloudConnectors/cron-validator
### Description According to the type docs, when using `IsDateString({ strict: true})`: "If `strict` is `true`, performs additional checks for valid dates, e.g. invalidates dates like `2009-02-29`". But those dates...
Hi team, `IsNumber` decorator throws error, when a small value is analyzed (ABS(x) < 0.000001. It happens because such a small value has exponential format --> ```bash > parseFloat('0.000001') <...
## Description @IsTaxID validator implemented. ## Checklist - [x] the pull request title describes what this PR does (not a vague title like `Update index.md`) - [x] the pull request...