about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authoralpaca-tc <alpaca-tc@alpaca.tc>2017-04-20 05:19:32 +0900
committerEugen <eugen@zeonfederated.com>2017-04-19 22:19:32 +0200
commit2c0d756ad942ee19c4f6dd18c9769b6649c2d15f (patch)
tree852f2ace7966f0048258c795581b3ca05ac0c6a0 /app/models
parentf06cba3f601faed1db40200eca5c9ad88b704dcb (diff)
Extract error messages to locale file (#2162)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb2
-rw-r--r--app/models/status.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 9b4f7e2ca..b497a90a3 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -8,7 +8,7 @@ class Account < ApplicationRecord
 
   # Local users
   has_one :user, inverse_of: :account
-  validates :username, presence: true, format: { with: /\A[a-z0-9_]+\z/i, message: 'only letters, numbers and underscores' }, uniqueness: { scope: :domain, case_sensitive: false }, length: { maximum: 30 }, if: 'local?'
+  validates :username, presence: true, format: { with: /\A[a-z0-9_]+\z/i }, uniqueness: { scope: :domain, case_sensitive: false }, length: { maximum: 30 }, if: 'local?'
   validates :username, presence: true, uniqueness: { scope: :domain, case_sensitive: true }, unless: 'local?'
 
   # Avatar upload
diff --git a/app/models/status.rb b/app/models/status.rb
index 2d27a57d5..b75bd0a7b 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -29,7 +29,7 @@ class Status < ApplicationRecord
   validates :uri, uniqueness: true, unless: 'local?'
   validates :text, presence: true, unless: 'reblog?'
   validates_with StatusLengthValidator
-  validates :reblog, uniqueness: { scope: :account, message: 'of status already exists' }, if: 'reblog?'
+  validates :reblog, uniqueness: { scope: :account }, if: 'reblog?'
 
   default_scope { order('id desc') }