Set a validation on :display_name

This commit is contained in:
nilsding 2014-12-12 18:52:56 +01:00
parent 4d944e1684
commit 130cbb27ce
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ class User < ActiveRecord::Base
validates :screen_name, presence: true, format: { with: SCREEN_NAME_REGEX }, uniqueness: { case_sensitive: false }
validates :display_name, length: { maximum: 50 }
# validates :website, format: { with: WEBSITE_REGEX }
def login=(login)