add max length for profile and event

This commit is contained in:
Torsten
2023-09-06 12:51:16 +03:00
parent 358e95f701
commit 2c399fbe18
3 changed files with 5 additions and 5 deletions

View File

@ -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