concept additional constraint in category asp.net

appears as: dditional constraints
ASP.NET Core in Action

This is an excerpt from Manning's book ASP.NET Core in Action.

As well as the basic features of literals and variable route parameter segments, route templates can use a number of additional features to build more powerful conventions, and hence more varied URLs. These can let you have optional URL segments, can provide default values when a segment isn’t specified, or can place additional constraints on the value that’s valid for a given route parameter. The next section takes a look at some of these, and ways you can apply them.

To avoid this problem, it’s possible to add additional constraints to a route template that must be satisfied for a URL to be considered a match. Constraints can be defined in a route template for a given route parameter using : (a colon). For example, {id:int} would add the IntRouteConstraint to the id parameter. For a given URL to be considered a match, the value assigned to the id route value must be convertible to an integer.