From 80b55af65912a004b437f94c5380ff32e5fedbdc Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:32:47 +0000 Subject: [PATCH] Update value --- app/models/location.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/location.rb b/app/models/location.rb index 1f0f89fbc..b29acfec1 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -3,7 +3,7 @@ class Location < ApplicationRecord validate :validate_postcode, on: :postcode, if: proc { |model| model.postcode.presence } validates :location_admin_district, on: :location_admin_district, presence: { message: I18n.t("validations.location_admin_district") } validates :units, on: :units, presence: { message: I18n.t("validations.location.units.must_be_number") } - validates :units, numericality: { greater_than: 1, message: I18n.t("validations.location.units.must_be_one_or_more") } + validates :units, numericality: { greater_than: 0, message: I18n.t("validations.location.units.must_be_one_or_more") } validates :type_of_unit, on: :type_of_unit, presence: { message: I18n.t("validations.location.type_of_unit") } validates :mobility_type, on: :mobility_type, presence: { message: I18n.t("validations.location.mobility_standards") } validates :startdate, on: :startdate, presence: { message: I18n.t("validations.location.startdate_invalid") }