Browse Source

Update error message label 2

pull/510/head
baarkerlounger 3 years ago
parent
commit
64a40d3725
  1. 2
      config/locales/en.yml
  2. 2
      spec/requests/case_logs_controller_spec.rb

2
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_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" other_field_not_required: "%{other_field_label} must not be provided if %{main_field_label} was not other"
numeric: numeric:
valid: "%{field} must be a between %{min} and %{max}" valid: "%{field} must be between %{min} and %{max}"
date: date:
invalid_date: "Please enter a valid date" invalid_date: "Please enter a valid date"
outside_collection_window: "Date must be within the current collection windows" outside_collection_window: "Date must be within the current collection windows"

2
spec/requests/case_logs_controller_spec.rb

@ -626,7 +626,7 @@ RSpec.describe CaseLogsController, type: :request do
it "returns an error message" do it "returns an error message" do
json_response = JSON.parse(response.body) 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
end end

Loading…
Cancel
Save