Skip to content

Support segment contraints in dynamic routes #13

Description

@testinfected

Make it possible to enforce a format for a dynamic segment of the route, so we can write:

get("/products/:id", where("id", "[A-Z]{2}-\d{2}")).to(...)

This route would match paths such as /products/AB-123, but not /products/123456.

Anchors will not be supported in the RegExp since we want to match the entire segment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions