One of my favorite features of ASP.NET MVC 2 is the support for client validation. I've covered a bit about validation in the following two posts: ASP.NET MVC 2 Custom Validation covers writing a custom client validator. Localizing ASP.NET MVC Validation covers localizing error messages. However, one topic I haven't covered is how validation works with globalization. A common example of this is when validating a number, the client validation should understand that users in the US enter periods as a decimal point, while users in Spain will use a comma. For example, let's assume I have a type with the RangeAttribute applied. In this case, I'm applying a range from 0 to 1000. public class Product { [Range(0, 1000)] public int QuantityInStock {...(read more) ...
Go to the complete details ...