MVC client validation

I have an ASP.NET MVC 5 application that needs to accept values โ€‹โ€‹in German format. I have tried following the instructions in Adding Validation to a Model , but I cannot find the required one globalize.culture.de-DE.js

.

I created a new project just for testing and installed the nuget package jquery-globalize

and pasted the Script which is listed on asp.net . I also added a new model and DbContext

:

public class Test
{
    public int Id { get; set; }
    public double Double { get; set; }
    public DateTime DateTime { get; set; }
    public string String { get; set; }
}

      

Then I created a CRUD controller and tried to send data in German format:

enter image description here

As expected, the data is not considered valid without the de-DE.js file.

What should I add to the project to get this to work?

+3


source to share


1 answer


Disclosure: I am not using ASP.NET or NuGet.

Check the downloaded version of the globalization program. You are using an outdated version of Globalize (0.x). The latest 0.x branch on NuGet is 0.1.3, where you can find these files:



+2


source







All Articles