diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-19 11:13:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-19 11:13:41 +0000 |
commit | 7b3f2b51c0ea735a4723fae24eff9bfbca254d8a (patch) | |
tree | 9d3f5786993a64e0f106ba82f31a9a1d8d06e6bb /app/models/user.rb | |
parent | e610fda877a44c7b194edddcbe6c71bb234401a1 (diff) | |
download | redmine-7b3f2b51c0ea735a4723fae24eff9bfbca254d8a.tar.gz redmine-7b3f2b51c0ea735a4723fae24eff9bfbca254d8a.zip |
Add length validations for string fields (#24283).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15989 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 1a6b621c0..81a2e7c77 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -111,6 +111,7 @@ class User < Principal validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i validates_length_of :login, :maximum => LOGIN_LENGTH_LIMIT validates_length_of :firstname, :lastname, :maximum => 30 + validates_length_of :identity_url, maximum: 255 validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true validate :validate_password_length validate do |