about summary refs log tree commit diff
path: root/app/validators
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-07-10 17:58:41 +0200
committerGitHub <noreply@github.com>2021-07-10 17:58:41 +0200
commit275fa4746b1b25ff3d59c09111c8129ef8e1ccda (patch)
treec863006916ef528f38134321366474f7560ae9fd /app/validators
parent3d5183e99c851ef97107407ec0f85fe9e31240bf (diff)
Add `configuration` attribute to `GET /api/v1/instance` (#16485)
List various values like file size limits and supported mime types
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/status_length_validator.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
index d036f1925..4c258ec16 100644
--- a/app/validators/status_length_validator.rb
+++ b/app/validators/status_length_validator.rb
@@ -2,7 +2,8 @@
 
 class StatusLengthValidator < ActiveModel::Validator
   MAX_CHARS = 500
-  URL_PLACEHOLDER = "\1#{'x' * 23}"
+  URL_PLACEHOLDER_CHARS = 23
+  URL_PLACEHOLDER = "\1#{'x' * URL_PLACEHOLDER_CHARS}"
 
   def validate(status)
     return unless status.local? && !status.reblog?