reject empty schedule_days with 422
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -112,6 +112,8 @@ class SchedulerConfig(BaseModel):
|
||||
@classmethod
|
||||
def validate_schedule_days(cls, v: List[str]) -> List[str]:
|
||||
"""Validate each entry is a valid 3-letter lowercase day abbreviation."""
|
||||
if not v:
|
||||
raise ValueError("schedule_days cannot be empty")
|
||||
invalid = [d for d in v if d not in _VALID_DAYS]
|
||||
if invalid:
|
||||
raise ValueError(
|
||||
|
||||
Reference in New Issue
Block a user