I'm trying to write validator for JSON returned from Bugzilla API. When I'm fetching comments data, I'm getting something like this: curl https://bugzilla.mozil
In Nest js dto I want to validate user mobile number with multiple countries Regex. How can I do this? @IsPhoneNumber('IN', { message: (args: ValidationArg
I want to apply server-side validation on my CRUD API. The entity in question is called Employee. I am using an employee.dto (shown below) for the create and up
I want to apply server-side validation on my CRUD API. The entity in question is called Employee. I am using an employee.dto (shown below) for the create and up
I'm trying to inject my users service into my validator constraint interface but it doesn't seem to work: import { ValidatorConstraintInterface, ValidatorConst
class Product { @Min(0, { message: 'should be positive number' }) @IsNotEmpty({ message: 'should not be empty' }) @Type(() => Number) price: number;
I have a mongoose discriminator schema, which mean the data will be different according to one of the attributes. class Feature { name: string option: Colo
import { isEmail, isEmpty, isPhoneNumber, Length } from "class-validator" import { Field, InputType } from "type-graphql"; @InputType() export class RegisterIn
I have created a sample application to save data for a user. I wanted to know how to validate it before saving and showing the response in JSON. I have got a re
I have an array of dates in a post request body that I want to validate: { "meals": [...], "dates": [ "2022-03-06T11:00:00.000Z", "2022-
Using class-validator along with NestJS I want to validate that a user provides either propertyA or a propertyB but they don't need to provide both. Currently,