bcardarella/client_side_validations — pull request #501 by GUI (2013-03-08 23:05:25+00:00)
Title: Fix only_integer validation when locale delimiters are used.

If only_integer is set to true for a numericality validation, it can't take advantage of the localization settings added in #461. So for example, I cannot enter "1,000" for a numericality validation when only_integer is set to true (but that does validate when only_integer is set to false).

This fixes that so that integer validations can also be entered with the delimiter. It's also a very minuscule optimization, since the replacement regex is only done once on the number, instead of multiple times inside the loop.

All the numericality javascript tests seem to be commented out, so I wasn't quite sure about how to add a test case around this. Let me know if you want me to add one or have any questions.