diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-25 15:26:56 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-25 15:26:56 +0200 |
commit | e9bc4a4a0822235afebbefa0c4d660b1be9ae52f (patch) | |
tree | c31007e321a90a55da1ad65cfd6a1633b8d1cc9a /app/models/account.rb | |
parent | 62b384824d39fb56cb211670126b38645fdf10cc (diff) |
Limit usernames to 30 chars, statuses to 500, open account after follow form success
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 25316c9a4..16db2d719 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -6,7 +6,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 }, if: 'local?' + 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, uniqueness: { scope: :domain, case_sensitive: true }, unless: 'local?' # Avatar upload |