mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
9 lines
326 B
Ruby
9 lines
326 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
class Validations::MentionValidator < ActiveModel::Validator
|
|
def validate(record)
|
|
return if Mention.mentionable? record.mentionable, record.user
|
|
|
|
record.errors.add :base, __('A mentioned user has no agent access to this ticket')
|
|
end
|
|
end
|