Function: validateRouteFormat()
API / @xmachines/play-router / validateRouteFormat
function validateRouteFormat(routePath, stateId): void;Defined in: validate-routes.ts:15
Validate route path format
Ensures route paths are non-empty strings. Both absolute paths (“/foo”) and relative paths (“foo”, “child/nested”) are accepted. Relative routes inherit their parent state’s path prefix when the tree is built.
Parameters
| Parameter | Type | Description |
|---|---|---|
routePath | string | Route path to validate (absolute or relative) |
stateId | string | State identifier for error messages |
Returns
void
Throws
If route path is empty