Skip to content

@IsOptional decorator not ignoring in case property is missing #107

@adnan-kamili

Description

@adnan-kamili

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions