DEV: Remove deprecated EmailValidator.email_regex (#24129)

The EmailValidator.email_regex method was moved to EmailAddressValidator.email_regex and marked for removal in 2.9.0. The method was proxied for backwards compatibility in plugins. This PR removes the method.
This commit is contained in:
Ted Johansson 2023-10-27 15:11:10 +08:00 committed by GitHub
parent ac70ef929f
commit 9acdafe87c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,13 +52,4 @@ class EmailValidator < ActiveModel::EachValidator
Rails.configuration.respond_to?(:developer_emails) &&
Rails.configuration.developer_emails.include?(value)
end
def self.email_regex
Discourse.deprecate(
"EmailValidator.email_regex is deprecated. Please use EmailAddressValidator instead.",
output_in_test: true,
drop_from: "2.9.0",
)
EmailAddressValidator.email_regex
end
end