fix: Standardize name validation on agent / profile pages (#1720)

This commit is contained in:
Karthik Sivadas
2021-02-04 20:08:46 +05:30
committed by GitHub
parent 6a614a520b
commit 2012aab1d5
5 changed files with 5 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ class User < ApplicationRecord
# validates_uniqueness_of :email, scope: :account_id
validates :email, :name, presence: true
validates_length_of :name, minimum: 1
has_many :account_users, dependent: :destroy
has_many :accounts, through: :account_users