Function validate_task
Source pub fn validate_task(task: &Task, is_new: bool) -> Result<(), TodoError>
Expand description
Validates a complete task before saving
Runs all validation checks on a task.
§Arguments
task - The task to validate
is_new - If true, disallows past due dates; if false, allows them
§Errors
Returns the first validation error encountered, or Ok(()) if all checks pass