From 64a40d37254608aa1c0a3ac6748ed27aa8616f80 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 26 Apr 2022 12:52:50 +0100 Subject: [PATCH] Update error message label 2 --- config/locales/en.yml | 2 +- spec/requests/case_logs_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 3bb62553e..0ed802b75 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -39,7 +39,7 @@ en: other_field_missing: "If %{main_field_label} is other then %{other_field_label} must be provided" other_field_not_required: "%{other_field_label} must not be provided if %{main_field_label} was not other" numeric: - valid: "%{field} must be a between %{min} and %{max}" + valid: "%{field} must be between %{min} and %{max}" date: invalid_date: "Please enter a valid date" outside_collection_window: "Date must be within the current collection windows" diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index 576fd7f18..04fd7e404 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -626,7 +626,7 @@ RSpec.describe CaseLogsController, type: :request do it "returns an error message" do json_response = JSON.parse(response.body) - expect(json_response["errors"]).to eq({ "age1" => ["Lead tenant’s age must be a number between 16 and 120"] }) + expect(json_response["errors"]).to eq({ "age1" => ["Lead tenant’s age must be between 16 and 120"] }) end end