1

Does ASP.NET MVC have a decimal route constraint baked into the core library?

I know there's the Regex Constraint but I was wondering if there's any others?

Pure.Krome
  • 84,693
  • 113
  • 396
  • 647

1 Answers1

2

I'm not aware of any, but it would be really easy to write your own. You just need to implement IRouteConstraint, which has a single Match method. Here is a blog post that explains it all in great detail.

Jon
  • 16,212
  • 8
  • 50
  • 62