mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 13:55:40 +08:00
Validates presence of UserEmail#user_id
in AR.
This commit is contained in:
parent
7777a44673
commit
0dec3269d8
@ -7,6 +7,7 @@ class UserEmail < ActiveRecord::Base
|
|||||||
|
|
||||||
before_validation :strip_downcase_email
|
before_validation :strip_downcase_email
|
||||||
|
|
||||||
|
validates :user_id, presence: true
|
||||||
validates :email, presence: true, uniqueness: true
|
validates :email, presence: true, uniqueness: true
|
||||||
|
|
||||||
validates :email, email: true, format: { with: EmailValidator.email_regex },
|
validates :email, email: true, format: { with: EmailValidator.email_regex },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user