Project

General

Profile

Feature #37679 » limit.patch

Increase validates_length_of :lastname - Anthony Mallet, 2022-09-15 21:36

View differences:

app/models/user.rb
110 110
  # Login must contain letters, numbers, underscores only
111 111
  validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i
112 112
  validates_length_of :login, :maximum => LOGIN_LENGTH_LIMIT
113
  validates_length_of :firstname, :lastname, :maximum => 30
113
  validates_length_of :firstname, :maximum => 30
114
  validates_length_of :lastname, :maximum => 255
114 115
  validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true
115 116
  Setting::PASSWORD_CHAR_CLASSES.each do |k, v|
116 117
    validates_format_of :password, :with => v, :message => :"must_contain_#{k}", :allow_blank => true, :if => Proc.new {Setting.password_required_char_classes.include?(k)}
(1-1/2)