Skip to content

Commit

Permalink
Feedback: More filters (pglombardo#1563)
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo authored Oct 21, 2023
1 parent 6201621 commit cf94db5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/feedback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class Feedback < MailForm::Base
attribute :control, validate: /\A97\z/
attributes :nickname, captcha: true

validates :message, format: { without: /\b(SEO|offer|ranking|transformative|engagement|click here)\b+/i,
# rubocop:disable Layout/LineLength
validates :message, format: { without: /\b(SEO|offer|ranking|rankings|transformative|engagement|click here|absolutely free)\b+/i,
message: 'spam detected' }
# rubocop:enable Layout/LineLength

# Declare the e-mail headers. It accepts anything the mail method
# in ActionMailer accepts.
Expand Down

0 comments on commit cf94db5

Please sign in to comment.