Break validationUtils.js (534 lines) into strategy pattern validators #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
validationUtils.js is a 534-line god class handling all validation logic with a massive switch statement. Adding new node types requires modifying this central file.
Solution
Refactor into strategy pattern: one validator per concern (string, number, enum, range, etc.) with a registry.
Bugs found during audit
Files affected
Acceptance criteria