Validate the format of FinancialTransactionType.name_short
This commit is contained in:
parent
54f9ffcc52
commit
226d2dda74
1 changed files with 1 additions and 0 deletions
|
@ -5,6 +5,7 @@ class FinancialTransactionType < ApplicationRecord
|
|||
validates :name, presence: true
|
||||
validates_uniqueness_of :name
|
||||
validates_uniqueness_of :name_short, allow_blank: true, allow_nil: true
|
||||
validates_format_of :name_short, :with => /\A[A-Za-z]*\z/
|
||||
validates :financial_transaction_class, presence: true
|
||||
|
||||
before_destroy :restrict_deleting_last_financial_transaction_type
|
||||
|
|
Loading…
Reference in a new issue