If property is explicitly set to null or "" then only @IsOptional() works. But if the property is missing undefined validations are applied, why is not undefined also treated in a similar manner. I need to ignore validations on few properties in the class if they are not present, how can I do that?
If property is explicitly set to
nullor""then only@IsOptional()works. But if the property is missingundefinedvalidations are applied, why is notundefinedalso treated in a similar manner. I need to ignore validations on few properties in the class if they are not present, how can I do that?