-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
creationcriticalUrgent - security vulnerability or blocking issueUrgent - security vulnerability or blocking issueenhancementNew feature or requestNew feature or requestvalidationValidation rules and error checkingValidation rules and error checking
Milestone
Description
Problem
The spell validation has significant gaps compared to complex forms (which have full duplicate/catalog/limit checks):
- No duplicate spell detection: A character can select the same spell multiple times. Complex forms have
CF_DUPLICATEbut spells have no equivalent. - No tradition/aspect compatibility check: An aspected sorcerer could select conjuring spells, or an aspected conjurer could select manipulation spells. The validator doesn't cross-reference selected spells against the character's tradition or aspect.
- No ritual validation: If rituals are supported in the data model, they are not validated.
Acceptance Criteria
- Server-side validator rejects duplicate spell selections (new
SPELL_DUPLICATEerror code) - Server-side validator checks spell categories against tradition/aspect restrictions
- Spell catalog validation (spell ID exists in ruleset) — equivalent to
CF_NOT_FOUND - Tests for duplicate, invalid, and tradition-incompatible spell selections
Priority
P1 — Critical — Spells are a core mechanic for 4 of 6 magical paths.
Files
lib/rules/validation/character-validator.ts(extendmagicValidatoror new validator)- Spell catalog data in
core-rulebook.json
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
creationcriticalUrgent - security vulnerability or blocking issueUrgent - security vulnerability or blocking issueenhancementNew feature or requestNew feature or requestvalidationValidation rules and error checkingValidation rules and error checking