Solved

MVC3 number validation and localization

Posted on 2012-12-30
1
368 Views
Last Modified: 2013-02-07
In my MVC3 app, the user can choose their currency. When they do this and it changes to a currency that uses commas and decimals opposite to the US method (commas for decimal points and dots for number separators).

I'm using the built in @Html.ValidationMessageFor() helpers and it doesn't like the non US format for numbers.

If an input has 1,00 instead of 1.00 it complains that the input must be a number. Googling around yesterday, I read you have to download and install the .NET 4 full language pack, but that didn't help.

Is there any easy way to use the built in validation helpers along with localization, or do I need to switch to jquery validation?
0
Comment
Question by:Josh_Blade
1 Comment
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 38731549
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question