Summary
Introduces strict platform-specific regex pattern checking on card creation and update payloads to prevent broken hyperlinks on developer cards.
Contexts
The POST /cards and PUT /cards/:id endpoints accept string inputs for usernames and profile URLs. Without platform-level constraints, users can submit formatting errors (e.g., spaces or unsupported special characters in a GitHub or Twitter handle). This results in malformed links on both the mobile interface and web backup layouts.
Tasks
Acceptance Criteria
Area
shared / backend
Difficulty
Easy
Summary
Introduces strict platform-specific regex pattern checking on card creation and update payloads to prevent broken hyperlinks on developer cards.
Contexts
The
POST /cardsandPUT /cards/:idendpoints accept string inputs for usernames and profile URLs. Without platform-level constraints, users can submit formatting errors (e.g., spaces or unsupported special characters in a GitHub or Twitter handle). This results in malformed links on both the mobile interface and web backup layouts.Tasks
packages/shared/src/platforms.ts.zodinput payload schemas.400 Validation Failedif input criteria are violated.Acceptance Criteria
400status.Area
shared/backendDifficulty
Easy