Welcome to mirror list, hosted at ThFree Co, Russian Federation.

email_validator.rb « validators « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aab07a7ece4531264c6460147d1fc3d05bd20383 (plain)
1
2
3
4
5
class EmailValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    record.errors.add(attribute, :invalid) unless value =~ Devise.email_regexp
  end
end