Leave Validation
Summary
Validation is distributed across DTO binding, application orchestration, domain methods, repository checks, and persistence constraints.
Audience
Backend developers, QA, architects, and security reviewers.
Overview
| Layer | Confirmed checks |
|---|---|
| Input/application | Required employee/type where applicable, date order, positive calculated days, Holiday/type names, callback decision shape. |
| Tenant | Required tenant context for commands and query filtering. |
| Employee projection | Exists, active, and request date not before joining. |
| Integration | Attendance conflicts on creation and approval; failure blocks normal service behavior. |
| Repository | Approved Leave overlap. |
| Domain | Tenant/employee identifiers, Pending-only approve/reject, rejection reason, cancellation behavior, balance/encashment unit rules. |
| Workflow | Managed Pending requests reject direct approve/reject; callback identity/state checks are partially verified. |
Balance sufficiency is not checked for Leave submission/approval. Stored minimum notice, maximum duration, maximum annual units, carry-forward maximum, negative-balance, type activity, and half-day eligibility are not fully enforced. Pending overlap, past/future-date policy, attachment requirements, and centralized policy assignment are absent or require confirmation.
Source References
microservices/src/leave-service/Application/LeaveWorkflows.csmicroservices/src/leave-service/Domain/Leave/LeaveRequest.csmicroservices/src/leave-service/Domain/Leave/LeaveBalance.csmicroservices/src/leave-service/Domain/Leave/LeaveDayCalculator.cs
Related Articles
See Also
Keywords
- Leave Service
- Leave Validation
- Technical architecture
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly