Validations for start and end date

This commit is contained in:
Gopesh Tulsyan 2014-04-05 21:44:30 +05:30
parent 628211f0fc
commit 014f768e0c

View file

@ -51,7 +51,9 @@ class Conference < ActiveRecord::Base
validates_presence_of :title,
:short_title,
:social_tag
:social_tag,
:start_date,
:end_date
validates_uniqueness_of :short_title
validates_format_of :short_title, :with => /^[a-zA-Z0-9_-]*$/