i need to validate currency field with formcheck plugin for mootools.
It has number validation type, and number accepts regex to personalize validation.
I need sample to validate:
1.000,01 --> ok
1,000.02 --> not ok
1000,12 --> ok
1000.13 --> not ok
10.000 --> ok
100.00 --> not ok
and so on.
Can you help me please?
thanks.
^\d+(?:\.\d\d\d)*(,\d\d)?$I’m assuming
.is your thousands separator,,is the decimal separator, and the comma must always be followed by two digits if it’s present.