Skip to content

Commit

Permalink
feat: add email uniqueness validation to MentorAtSchoolPeriods model
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyRet committed Jan 20, 2025
1 parent 713cb03 commit 41a2731
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/mentor_at_school_period.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class MentorAtSchoolPeriod < ApplicationRecord
notify_email: true,
allow_nil: true

validates :email,
email_uniqueness: true,
allow_nil: true

validates :started_on,
presence: true

Expand Down

0 comments on commit 41a2731

Please sign in to comment.