mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 16:26:03 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user