class AdditionalId < ApplicationRecord
  belongs_to :associated, polymorphic: true, optional: true

  validates :number, presence: true, length: { maximum: 32 }

  before_validation :strip_number

  private
    def strip_number
      self.number = number.strip
    end
end
