diff options
author | Go MAEDA <maeda@farend.jp> | 2018-11-08 13:01:06 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-11-08 13:01:06 +0000 |
commit | c5eff3dae254481d038fe482466d2075b63b0338 (patch) | |
tree | 739c8f7f70c418ac58007605b1c2cbc3b2f0bffa /lib | |
parent | 54cfb7b75ede8736c8bee1a4aa88e098e1df3889 (diff) | |
download | redmine-c5eff3dae254481d038fe482466d2075b63b0338.tar.gz redmine-c5eff3dae254481d038fe482466d2075b63b0338.zip |
Strip whitespace from integer custom field (#8317).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17625 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/field_format.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 4d168b434..64fcdc6a4 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -490,7 +490,7 @@ module Redmine def validate_single_value(custom_field, value, customized=nil) errs = super - errs << ::I18n.t('activerecord.errors.messages.not_a_number') unless value.to_s =~ /^[+-]?\d+$/ + errs << ::I18n.t('activerecord.errors.messages.not_a_number') unless value.to_s.strip =~ /^[+-]?\d+$/ errs end |