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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *