Skip to content

fix: reject inverted budget ranges in job creation#6657

Open
q404365631 wants to merge 1 commit into
SecureBananaLabs:mainfrom
q404365631:fix/job-budget-validation
Open

fix: reject inverted budget ranges in job creation#6657
q404365631 wants to merge 1 commit into
SecureBananaLabs:mainfrom
q404365631:fix/job-budget-validation

Conversation

@q404365631

Copy link
Copy Markdown

Summary

createJobSchema accepted payloads where budgetMax was lower than budgetMin, creating invalid job records like "USD 500-100".

Changes

  • Add .refine() to createJobSchema ensuring budgetMax >= budgetMin
  • Add same validation to updateJobSchema when both budget fields are present
  • updateJobSchema now uses explicit optional fields instead of .partial() to support the refine check
  • Valid ordered ranges continue to parse successfully

Closes #2853

/claim #2853

github-actions Bot added a commit that referenced this pull request Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Job validation should reject inverted budget ranges

1 participant