Skip to content

feat: alidate and cap date ranges on analytics query DTOs - #580

Merged
A6dulmalik merged 1 commit into
MindBlockLabs:mainfrom
Tyler7x:issue/555-validate-date-range
Jul 21, 2026
Merged

feat: alidate and cap date ranges on analytics query DTOs#580
A6dulmalik merged 1 commit into
MindBlockLabs:mainfrom
Tyler7x:issue/555-validate-date-range

Conversation

@Tyler7x

@Tyler7x Tyler7x commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Add class-validator constraints to DateRangeDto enforcing start <= end and a maximum range span of 1 year, rejecting requests that violate either.

Changes

  • Add ValidDateRangeConstraint custom validator class
  • Add DateRangeDto with @Validate(ValidDateRangeConstraint)
  • Create analytics module infrastructure (module, entity, controller, providers)

Acceptance Criteria

  • Requests with start > end return a 400
  • Requests exceeding the max span return a 400 with a clear message

Closes #555

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
mind-block-app-frontend Skipped Skipped Jul 21, 2026 10:04am

@phertyameen phertyameen changed the title Validate and cap date ranges on analytics query DTOs feat: alidate and cap date ranges on analytics query DTOs Jul 21, 2026
Add class-validator constraints to DateRangeDto enforcing start <= end
and a maximum range span of 1 year, rejecting requests that violate
either. Custom ValidDateRangeConstraint handles both validations.

Closes MindBlockLabs#555
@Tyler7x
Tyler7x force-pushed the issue/555-validate-date-range branch from df18f39 to 4538a55 Compare July 21, 2026 10:04
@A6dulmalik
A6dulmalik merged commit 2fe19ce into MindBlockLabs:main Jul 21, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate and cap date ranges on all analytics query DTOs

2 participants