I have a validation rule as shown below:
loanAmount:{required:true,number:true,range:[20000,500000]},
I also want to do currency formatting for the loanAmount field. So I have used the autoNumeric plugin as shown below:
$('#loanAmount').autoNumeric({dGroup:2});
However, with this the range validation for the loanAmount does not work properly. Instead of getting the raw value for loanAmount, jquery gets the formatted value and hence is not able to validate. For instance, when I enter 25000, it becomes 25,000 and is passed to jquery and the validation does not work as expected.
Is there a way around this?
Will be glad if someone can help.
Thanks, Saurabh