Extract constants for column size length validation limits (#30045)
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#
|
||||
|
||||
class UserInviteRequest < ApplicationRecord
|
||||
TEXT_SIZE_LIMIT = 420
|
||||
|
||||
belongs_to :user, inverse_of: :invite_request
|
||||
validates :text, presence: true, length: { maximum: 420 }
|
||||
validates :text, presence: true, length: { maximum: TEXT_SIZE_LIMIT }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user