> ## Documentation Index
> Fetch the complete documentation index at: https://committ.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation

> Runtime validation for task drafts and time slots.

# Validation

The Validation module (lib/validation/) provides runtime validation for task drafts before they are submitted to the Triple-Write Orchestrator.

***

## Validation Files

| File         | Purpose                                               |
| :----------- | :---------------------------------------------------- |
| taskDraft.ts | Validates the complete TaskDraft object before commit |
| timeSlot.ts  | Validates individual time slot configurations         |
| index.ts     | Barrel export and validation orchestration            |

***

## Task Draft Validation

The validateTaskDraft() function checks:

* Title is non-empty
* At least one time window is configured
* All time windows have valid start/end times (start before end)
* If location conditions exist, GPS coordinates are valid
* If penalty is configured, required fields are present
* If waiver is configured, deadline is positive

***

## Time Slot Validation

The validateTimeSlot() function checks:

* Start time is before end time
* Time window does not overlap with existing windows on the same day
* Slot-level conditions (if attached) have valid configurations
