Skip to content

CreateEventDto doesn't validate that endsAt is after startsAt #11

Description

@presidojay1

startsAt and endsAt are validated independently with @IsDate(), but nothing checks their relative order, so an event with endsAt before (or equal to) startsAt is silently accepted.

Suggested fix: Add validation (custom decorator or a manual check in EventsService.create()) that rejects endsAt <= startsAt with a BadRequestException.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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