discourse/lib/validators/email_setting_validator.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
295 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class EmailSettingValidator
def initialize(opts = {})
@opts = opts
end
def valid_value?(val)
return true if val.blank?
EmailAddressValidator.valid_value?(val)
end
def error_message
I18n.t("site_settings.errors.invalid_email")
end
end