diff options
author | rohit <rohit.arondekar@gmail.com> | 2010-05-18 06:09:45 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-18 03:10:56 +0200 |
commit | 8e3c3b06dc8ff8842f6390efc58eaf4bb1a23060 (patch) | |
tree | 039bab343a3a8c63fccf2b10bf646c39a73d83a5 /activemodel/lib/active_model/validations/numericality.rb | |
parent | 05e3fb45eeacd20f2b8b5691f17d6fdf2fb4582b (diff) | |
download | rails-8e3c3b06dc8ff8842f6390efc58eaf4bb1a23060.tar.gz rails-8e3c3b06dc8ff8842f6390efc58eaf4bb1a23060.tar.bz2 rails-8e3c3b06dc8ff8842f6390efc58eaf4bb1a23060.zip |
Fixed numericality validator in ActiveModel to reject hex numbers for floats completely [#4622 state:commited]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel/lib/active_model/validations/numericality.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/numericality.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index ac8308b0d7..062b4cd17f 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -58,7 +58,7 @@ module ActiveModel def parse_raw_value_as_a_number(raw_value) case raw_value - when /\A0x/ + when /\A0[xX]/ nil else begin |