Skip to content

Function: validateRouteFormat()

Documentation / @xmachines/play-router / validateRouteFormat

function validateRouteFormat(routePath, stateId): void;

Defined in: validate-routes.ts:14

Validate route path format

Ensures route paths start with ”/” (absolute or relative). Per Route Protocol spec, all routes must have explicit path structure.

Parameters

ParameterTypeDescription
routePathstringRoute path to validate
stateIdstringState identifier for error messages

Returns

void

Throws

If route path doesn’t start with /