route constraint

A rule inside a route template, such as :int in {id:int}, that a URL segment must satisfy for the route to match.

In more detail

A non-numeric identifier then gets 404 before your code runs. Constraints disambiguate routes; they are not a substitute for input validation.

Related terms

Taught in

References