mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Adjust validations for List
This commit is contained in:
parent
69826eefe3
commit
a3f80380dd
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,9 @@ class List < ApplicationRecord
|
|||
belongs_to :user
|
||||
has_many :list_members, dependent: :destroy
|
||||
|
||||
validates :name, length: { minimum: 1 }
|
||||
validates :name,
|
||||
length: { minimum: 1 },
|
||||
uniqueness: { scope: :user_id }
|
||||
validates :display_name, length: { maximum: 30 }
|
||||
|
||||
before_validation do
|
||||
|
|
Loading…
Reference in a new issue