chore: Account auto resolution time validation (#3651)

This commit is contained in:
Shivam Chahar
2022-01-19 13:16:21 +05:30
committed by GitHub
parent 1b36143d27
commit 9617137688
17 changed files with 18 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ class Account < ApplicationRecord
}.freeze
validates :name, presence: true
validates :auto_resolve_duration, numericality: { greater_than_or_equal_to: 1, allow_nil: true }
validates :auto_resolve_duration, numericality: { greater_than_or_equal_to: 1, less_than_or_equal_to: 999, allow_nil: true }
has_many :account_users, dependent: :destroy_async
has_many :agent_bot_inboxes, dependent: :destroy_async