I have build a custom attribute to validate on the client side a positive decimal value. The problem is that when I apply the regular expression directly to the property, it
You need to register your attribute in global.asax. In its Application_Start() method, add the following code:
global.asax
Application_Start()
DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(PositiveDecimalAttribute), typeof(RegularExpressionAttributeAdapter));