MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / trailNameProblem

Function trailNameProblem

ui/src/lib/trails-model.ts:148–153  ·  view source on GitHub ↗
(name: string, maxLength: number)

Source from the content-addressed store, hash-verified

146 * its own button rather than teaching by round-trip.
147 */
148export function trailNameProblem(name: string, maxLength: number): string | null {
149 const trimmed = name.trim();
150 if (trimmed === '') return 'Give the trail a name.';
151 if (trimmed.length > maxLength) return `That name is too long (max ${maxLength} characters).`;
152 return null;
153}
154
155/**
156 * The trail this name would replace, or null when it would be a new one.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected