Reputation: 263
I have an application built on ServiceStack and razor (no MVC). The application has a class with an integer field. When I enter an integer with thousand separator(comma) from a web page that allows me to enter data for the field, I get an error with something like "'23,586' is an Invalid value for 'Fieldxx'".
Is there a way to allow integers with thousand separator?
Thanks.
Upvotes: 1
Views: 35
Reputation: 143319
No integers are whole numbers, if you want to keep using an integer I'd recommend your Web Page strip any formatting before sending the API request otherwise change it to a string and convert it into an int
inside the Service implementation.
Upvotes: 1