This project is read-only.

LessThenOrEqualTo with Decimal and Globalization


LessThenOrEqualTo does not work when the decimal separator is not dot (".").

This problem was reported in this link and is not fixed yet:

My language is pt-BR and the decimal separator is comma (",").

My form is comparing 5,00 with 10,00 and is reporting that 5,00 is greater then 10,00. If I set 5.00 the validation works but ModelState is invalid.


hidegh wrote Jan 26, 2016 at 8:19 PM

Other frameworks exposes methods for number/date/bool parsing which can be override-d. So if you change the function to use f.e. globalize.parse* Int/Date/Float instead, then it could work. Actually don;t know if something like that is possible with this framework.

Dromar wrote Feb 23, 2016 at 9:00 AM

I'm looking at other frameworks exposing similar functionallity

Xifeidanhu wrote Jan 27 at 4:14 PM

just wondering have you try int?

I was trying to use LessThenOrEqualTo to validate the int. looks like dosenot work at all.

It seems dont pass the validate no matter what I input is.

wrote Jan 27 at 4:15 PM