I have a signup DTO where one member is dependent of another.
The IsPostalCode on zip needs to know the countryCode/locale, which is one of the other class members.
Is it possible to use a class member as decorator argument?
import {
IsEmail,
IsISO31661Alpha2,
IsPostalCode,
IsString
} from "class-validator"
export class SignupDto {
@IsEmail()
email: string
@IsString()
password: string
@IsISO31661Alpha2()
countryCode: string
// Something like this
@IsPostalCode(this.countryCode)
zip: string
}