discourse/lib/validators/email_setting_validator.rb

17 lines
295 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class EmailSettingValidator
2017-07-27 20:20:09 -05:00
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