Issue with Decimals, Commas and Client-Side Validation

前端 未结 2 637
栀梦
栀梦 2021-01-13 18:27

I\'m trying to achieve client-side validation for a nullable whose decimal separator can be a comma (e.g.: 123,45).

In my View:



        
2条回答
  •  忘掉有多难
    2021-01-13 19:13

    Just a small update regarding globalize.js. Things are a bit different (and confusing) now:

    Include the scripts as follows:

    
    
    
    
    
    
    
    
    

    Now we need to load the I18n content onto Globalize:

    
    

    The I18n content is available as JSON here.

    If you get 404 on your getJSON(), remember to add:

    
    
        (...)
    
        
          
        
    
    
    

    in your Web.config (ASP .NET MVC application).

提交回复
热议问题