Reputation: 4242
I have a field to which I am setting the range validation dynamically from 70.00 to 1050.00 which works fine as shown below
The issue is when the field is validated it shows the error message ignoring the decimal points
I want the error message to say "This value should be between 70.00 to 1050.00." I tried searching and doing some changes to my code but it didn't help.
Can someone point me on how to get this done?
Side Note: It works if decimal places has other values in it like "70.01 to 1050.01"
Upvotes: 2
Views: 1145
Reputation: 4242
Ok, So I added a attribute at runtime
"data-parsley-range-message"
and added my error text to it which did the trick.
Thanks
Upvotes: 1
Reputation: 79612
Right, parlsey
converts them to float, then back to string. I'm not sure how simple it would be to change this, but I'm wouldn't be opposed to a PR. Or customize the error message.
Upvotes: 0