mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 05:36:07 +10:00
6 lines
185 B
Ruby
6 lines
185 B
Ruby
class EmailValidator < ActiveModel::EachValidator
|
|
def validate_each(record, attribute, value)
|
|
record.errors.add(attribute, :invalid) unless value =~ Devise.email_regexp
|
|
end
|
|
end
|