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?
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?
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.