From 3ed8e0bc84da7c5c2fae3facdb2d441b13c233f8 Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 15 Jul 2013 17:57:00 +0200 Subject: [PATCH] allow longer supplier phone number --- app/models/supplier.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/supplier.rb b/app/models/supplier.rb index 01f93d35..b1466a70 100644 --- a/app/models/supplier.rb +++ b/app/models/supplier.rb @@ -13,11 +13,9 @@ class Supplier < ActiveRecord::Base :delivery_days, :order_howto, :note, :shared_supplier_id, :min_order_quantity validates :name, :presence => true, :length => { :in => 4..30 } - validates :phone, :presence => true, :length => { :in => 8..20 } + validates :phone, :presence => true, :length => { :in => 8..25 } validates :address, :presence => true, :length => { :in => 8..50 } validates_length_of :order_howto, :note, maximum: 250 - validates_length_of :phone, :in => 8..20 - validates_length_of :address, :in => 8..50 validate :uniqueness_of_name scope :undeleted, -> { where(deleted_at: nil) }