The validator in
lib/validatious-on-rails/validatious/validators/numericality/only_integer_validator.rb
tests if an input is a integer. However the regex used uses a backslash that needs to be escaped in order to be correctly translated to javascript:
buggy:
return /^[+-]?\d+$/.test(value);
fix:
return /^[+-]?\d+$/.test(value);
The validator in
lib/validatious-on-rails/validatious/validators/numericality/only_integer_validator.rb
tests if an input is a integer. However the regex used uses a backslash that needs to be escaped in order to be correctly translated to javascript:
buggy:
return /^[+-]?\d+$/.test(value);
fix:
return /^[+-]?\d+$/.test(value);