elsifincorrect_accuracy||value.to_d!=value.to_i# if the user enters a value in exponent notation (eg '4e1') the to_i method does not convert this to the correct value
elsifincorrect_accuracy||value.to_d!=value.to_i# if the user enters a value in exponent notation (eg '4e1') the to_i method does not convert this to the correct value
scheme_deleted:"%{service_name} has been deleted."
scheme_deleted:"%{service_name} has been deleted."
user_deleted:"%{name} has been deleted."
user_deleted:"%{name} has been deleted."
organisation_deleted:"%{name} has been deleted."
organisation_deleted:"%{name} has been deleted."
user_updated:
user_updated:
self:"Your account details have been updated."
self:"Your account details have been updated."
other:"%{name}’s details have been updated."
other:"%{name}’s details have been updated."
@ -257,19 +257,7 @@ en:
invalid_number:"Enter a number for %{question}"
invalid_number:"Enter a number for %{question}"
no_address_found:"We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."
no_address_found:"We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site."
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:
within_range:"%{field} must be between %{min} and %{max}."
above_min:"%{field} must be at least %{min}."
whole_number:"%{field} must be a whole number."
nearest_ten:"%{field} must be given to the nearest ten."
nearest_hundredth:"%{field} must be given to the nearest hundredth."
normal_format:"Enter a number."
format:"%{field} must be a number."
date:
date:
invalid_date:"Enter a date in the correct format, for example 31 1 2024."
outside_collection_window:"Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}."
outside_collection_window:"Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}."
postcode:"Enter a postcode in the correct format, for example AA1 1AA."
postcode:"Enter a postcode in the correct format, for example AA1 1AA."
location_admin_district:"Select a local authority."
location_admin_district:"Select a local authority."
expect(sales_log.errors["savings"]).toinclude(matchI18n.t("validations.numeric.above_min",field:"Buyers’ total savings before any deposit paid",min:"£0"))
expect(sales_log.errors["savings"]).toinclude(matchI18n.t("validations.shared.numeric.above_min",field:"Buyers’ total savings before any deposit paid",min:"£0"))
end
end
context"when validating percent"do
context"when validating percent"do
@ -101,7 +101,7 @@ RSpec.describe Validations::SharedValidations do