class-validator
class-validator copied to clipboard
Decorator-based property validation for classes.
I was trying to validate if a property based on the value a property that is stored in a different class. When an API request enters the service I'd like...
I did a quick search to to be certain and immediately found these websites that also state that it is indeed written and pronounced as "a url": - https://www.techtarget.com/whatis/feature/Which-is-correct-a-URL-or-an-URL -...
I am trying to find a way to validate a class, that can have multiple names for objects ``` export class MailConfig { @IsOptional() @ValidateNested() @Type(() => SubjectConfig) mailingSubjects*: SubjectConfig;...
**I was trying to...** I'm trying to validate a phone number from the United States ```typescript ... @IsOptional() @IsPhoneNumber('US') readonly phone_number: string ... ``` **The problem:** The validation gets bypassed...
**I was trying to...** Hi. I want to change input value to uppercase. For example, input value is 'asc', class validator decorator change input value to 'ASC'. How can I...
Hi, I'm trying to validate this model and the `Nested` part is not validate properly : ``` export class Nested { @IsString() name: string; } export class Test{ @IsString() id:...
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 21.0.3 to 22.0.2. Changelog Sourced from @rollup/plugin-commonjs's changelog. v22.0.2 2022-08-05 Bugfixes fix: Exclude multi-line template strings from indent (#1229) v22.0.1 2022-06-24 Bugfixes fix: Only proxy detected commonjs...
### Description 1. `@IsMongoId()` just checks if it is a string (see below, taken from your code base) where you could have used `ObjectId.isValid()` from the `mongodb` or `bson` repo....
### Description Version: 0.13.2 If is use @IsEnum() to validate a string enum, validation succeeds if i validate an empty input "" **Minimal code-snippet showcasing the problem** ``` export enum...
### Description The decorator `@IsDateString()` is not validating dates like `2019-02-31` **Minimal code-snippet showcasing the problem** ## Here the original source code, please see the big arrow indicating where the...