add max length for profile and event
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
class Event < ApplicationRecord
|
||||
belongs_to :profile
|
||||
|
||||
validates :name , presence: true
|
||||
validates :text , presence: true
|
||||
validates_length_of :name , minimum: 3 , maximum: 100
|
||||
validates_length_of :text, minimum: 30 , maximum: 1200
|
||||
validates :start_date , presence: true
|
||||
validates :picture , presence: true
|
||||
|
||||
|
Reference in New Issue
Block a user