app/models/unidom/order/order.rb in unidom-order-1.5.3 vs app/models/unidom/order/order.rb in unidom-order-1.5.4
- old
+ new
@@ -7,11 +7,11 @@
include Unidom::Common::Concerns::ModelExtension
include Unidom::Order::Concerns::AsAdjusted
validates :number, presence: true, length: { is: self.columns_hash['number'].limit }
- validates :purchase_amount, presence: true, numericality: { less_than: 1_000_000_000, greater_than: 0 }
- validates :aggregate_amount, presence: true, numericality: { less_than: 1_000_000_000, greater_than: 0 }
+ validates :purchase_amount, presence: true, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 1_000_000_000 }
+ validates :aggregate_amount, presence: true, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 1_000_000_000 }
belongs_to :placer, polymorphic: true
belongs_to :taker, polymorphic: true
has_many :items, class_name: 'Unidom::Order::OrderItem'