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?
Copyright © 2021 Jogjafile Inc.
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 singleMatch
method. Here is a blog post that explains it all in great detail.