Skip to main content

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

LayerConfirmed checks
Input/applicationRequired employee/type where applicable, date order, positive calculated days, Holiday/type names, callback decision shape.
TenantRequired tenant context for commands and query filtering.
Employee projectionExists, active, and request date not before joining.
IntegrationAttendance conflicts on creation and approval; failure blocks normal service behavior.
RepositoryApproved Leave overlap.
DomainTenant/employee identifiers, Pending-only approve/reject, rejection reason, cancellation behavior, balance/encashment unit rules.
WorkflowManaged 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.cs
  • microservices/src/leave-service/Domain/Leave/LeaveRequest.cs
  • microservices/src/leave-service/Domain/Leave/LeaveBalance.cs
  • microservices/src/leave-service/Domain/Leave/LeaveDayCalculator.cs

See Also

Keywords

  • Leave Service
  • Leave Validation
  • Technical architecture

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly