mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Remove message argument from NoteLengthValidator error approach (#37977)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class NoteLengthValidator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, value)
|
||||
record.errors.add(attribute, :too_long, message: I18n.t('statuses.over_character_limit', max: options[:maximum]), count: options[:maximum]) if too_long?(value)
|
||||
record.errors.add(attribute, :too_long, count: options[:maximum]) if too_long?(value)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user