2

I would like to know how to enable validation localization for jQuery for example according to sample at Docs Microsoft at the and of article?

Crossposted at https://forums.asp.net/p/2119555/6130560.aspx?p=True&t=636274881674960601.

1 Answer 1

1

Try to install the packages:

  1. Install-Package jquery-globalize;
  2. Install-Package jquery.validation.globalize;

Them add the references at the following order:

  1. jquery.validate.js;
  2. jquery.validate.unobstrusive.js;
  3. globalize/globalize.js;
  4. jquery.validate.globalize.js.
Sign up to request clarification or add additional context in comments.

5 Comments

Okay. Thanks but probably there should be invoked the correct locale-language through JavaScript, shouldn't be?
The packages I'm referring to are nuget packeges, so you should run on the nuget console. And js files, as you are working with MVC, you could add dynamically, by using a bundle, or manually in the HTML.
Okay, I have had mistake in markup. Now it is working except for decimal type property annotated with Range and DataType.Currency which is not validate at client scripting side.
does not find such files after installation
Did you run it inside Package Manager Console? Make sure you selected the web project option on the Default Project dropdown. It should be added to the scripts folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.