FIX: Add length validation for `User#name`.
This commit is contained in:
parent
1cf0401e26
commit
980cea7081
|
@ -80,7 +80,7 @@ class User < ActiveRecord::Base
|
|||
validates :email, format: { with: EmailValidator.email_regex }, if: :email_changed?
|
||||
validates :email, email: true, if: :should_validate_email?
|
||||
validate :password_validator
|
||||
validates :name, user_full_name: true, if: :name_changed?
|
||||
validates :name, user_full_name: true, if: :name_changed?, length: { maximum: 255 }
|
||||
validates :ip_address, allowed_ip_address: {on: :create, message: :signup_not_allowed}
|
||||
|
||||
after_initialize :add_trust_level
|
||||
|
|
Loading…
Reference in New Issue