Browse Source

feat: remove name validation as a result of PO review

pull/1034/head
natdeanlewissoftwire 4 years ago
parent
commit
1846e5d476
  1. 1
      app/models/location.rb
  2. 1
      config/locales/en.yml

1
app/models/location.rb

@ -2,7 +2,6 @@ class Location < ApplicationRecord
validates :postcode, on: :postcode, presence: { message: I18n.t("validations.location.postcode_blank") }
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 :name, on: :name, presence: { message: I18n.t("validations.location.name") }
validates :units, on: :units, presence: { message: I18n.t("validations.location.units") }
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") }

1
config/locales/en.yml

@ -346,7 +346,6 @@ en:
location:
postcode_blank: "Enter a postcode"
name: "Enter the name of the location"
units: "The units at this location must be a number"
type_of_unit: "Select the most common type of unit at this location"
mobility_standards: "Select the mobility standard for the majority of the units at this location"

Loading…
Cancel
Save