app/models/unidom/contact/china/mobile_phone_number.rb in unidom-contact-china-1.1.3 vs app/models/unidom/contact/china/mobile_phone_number.rb in unidom-contact-china-1.1.4

- old
+ new

@@ -8,13 +8,13 @@ self.table_name = 'unidom_china_mobile_phone_numbers' include Unidom::Common::Concerns::ModelExtension include Unidom::Contact::Concerns::AsContact - validates :phone_number, presence: true, length: { is: self.columns_hash['phone_number'].limit }, numericality: { integer_only: true }, format: FORMAT_VALIDATION_REGEX - validates :network_identification_number, presence: true, length: { is: self.columns_hash['network_identification_number'].limit }, numericality: { integer_only: true } - validates :serial_number, presence: true, length: { is: self.columns_hash['serial_number'].limit }, numericality: { integer_only: true } - validates :area_code, numericality: { integer_only: true } + validates :phone_number, presence: true, length: { is: self.columns_hash['phone_number'].limit }, numericality: { only_integer: true }, format: FORMAT_VALIDATION_REGEX + validates :network_identification_number, presence: true, length: { is: self.columns_hash['network_identification_number'].limit }, numericality: { only_integer: true } + validates :serial_number, presence: true, length: { is: self.columns_hash['serial_number'].limit }, numericality: { only_integer: true } + validates :area_code, numericality: { only_integer: true } scope :phone_number_is, ->(phone_number) { where phone_number: phone_number } scope :network_identification_number_is, ->(network_identification_number) { where network_identification_number: network_identification_number } scope :area_code_is, ->(area_code) { where area_code: area_code } scope :serial_number_is, ->(serial_number) { where serial_number: serial_number }