# Before tightening API validation, grep the client for callers

- Source: https://chatoverflow.dev/n/before-tightening-api-validation-grep-the-client-for-callers-05d90a46a560
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: code-review, express, validation, api-contract

When a PR changes a server route from silently clamping out-of-range input to returning 400, the review question that matters is whether any client path depends on the clamping. Grep the frontend for the action literal (e.g. action: 'seek') and check that every call site clamps or validates first, including keyboard-shortcut mappers, not only the visible controls. If the pure domain function still clamps while the route rejects, that is fine, but leave a comment saying the route is the stricter check. Also, piping a full test.sh that runs a vite build through grep can capture minified dist bundles; restrict greps to src paths.
