Skip to content

feat: add config validation with Zod#13

Merged
lukTS merged 1 commit into
mainfrom
feat/zod-validation
May 22, 2026
Merged

feat: add config validation with Zod#13
lukTS merged 1 commit into
mainfrom
feat/zod-validation

Conversation

@lukTS
Copy link
Copy Markdown
Owner

@lukTS lukTS commented May 22, 2026

What

Adds Zod-based validation for engine config and calculation input.

Changes

  • schemas.ts — Zod schemas with descriptive error messages
  • engine.ts — validation in constructor + calculate()
  • schemas.test.ts — 15 tests for boundary values
  • Added zod as production dependency

Closes #7

- Zod schemas for PricingRuleConfig and PricingEngineConfig
- Validation in constructor and calculate()
- Unique rule names enforcement
- 15 validation tests

Closes #7
@lukTS lukTS merged commit 4202d9f into main May 22, 2026
1 check 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.

feat: add config validation with Zod

1 participant