diff --git a/app/models/mute_rule.rb b/app/models/mute_rule.rb index 3e2a66af..4ca5e15d 100644 --- a/app/models/mute_rule.rb +++ b/app/models/mute_rule.rb @@ -3,7 +3,7 @@ class MuteRule < ApplicationRecord belongs_to :user - validates :muted_phrase, presence: true + validates :muted_phrase, length: { minimum: 1 } def applies_to?(post) !!(post.content =~ /\b#{Regexp.escape(muted_phrase)}\b/i)