To ensure that a route parameter matches a regular expression pattern, one would use the {parameter:______} constraint.
- regex
- regular
- match
- constraint
In ASP.NET Core, you can use the {parameter:regex} constraint to specify a regular expression pattern that a route parameter must match for the route to be selected. This is helpful when you need to apply specific validation rules to route parameters.
Loading...
Related Quiz
- Middleware components in ASP.NET Core are executed in the order they are added to the _________ pipeline.
- What is the primary purpose of Razor Layout Views in ASP.NET Core?
- When using attribute routing, what is the significance of the order in which routes are defined?
- When using the [Authorize] attribute with policies, the specified policy name must be previously registered in the _________.
- Razor views support ________, which allows for logic to be embedded directly within the HTML.