python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Is possible filter an Object in Nestjs class-validator?
I have the following class:
export class CreateUserDto {
@IsEmail()
email: string;
@IsNotEmpty()
password: string;
}
But if i sent to my route the following Object:
{
"email": &...

Henrique Ramos
Votes: 0
Answers: 1
Class-validator: How accept missing field?
The validator throw error "brandId must be a number conforming to the specified constraints",
when I missing "not require" field in body.
My validator class:
export class CreateNot...
Nhất Hàn
Votes: 0
Answers: 1
NestJS query params array has a length limit?
I have an endpoint in my NestJS server that takes a DTO as a @Query params. This DTO has an array :
import { Type } from 'class-transformer';
import { IsArray, IsOptional, IsString, IsNumber } from 'c...

Sévrain CHEA
Votes: 0
Answers: 1
Use class-validator Matches to validate property pattern with a regex
I wrote the following simple script:
let regexpNumber = new RegExp('^[+ 0-9]{5}$');
const digitStringProp1: string = '12345'
const digitStringProp2: string = '1234f'
const digitStringProp3: string = ...

belostoky
Votes: 0
Answers: 1