Skip to content

Commit

Permalink
Clarify panel start/end date error #627
Browse files Browse the repository at this point in the history
  • Loading branch information
jseraf committed Oct 6, 2020
1 parent abf7a94 commit 589691e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/panel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class Panel < ApplicationRecord
message: 'is required if start is provided.'

validates_datetime :start_datetime, before: :end_datetime,
if: -> { start_datetime? || end_datetime? }
if: -> { start_datetime? || end_datetime? },
before_message: 'must be before End Date/Time'

validates_uniqueness_of :grant
validates :meeting_link, if: -> { meeting_link? },
Expand Down

0 comments on commit 589691e

Please sign in to comment.