Browse Source

Add not_number translation

pull/2744/head
Manny Dinssa 8 months ago
parent
commit
62c34ea296
  1. 2
      app/models/user.rb
  2. 1
      config/locales/en.yml

2
app/models/user.rb

@ -19,7 +19,7 @@ class User < ApplicationRecord
validates :password, presence: { if: :password_required? }
validates :password, length: { within: Devise.password_length, allow_blank: true }
validates :password, confirmation: { if: :password_required? }
validates :phone_extension, format: { with: /\A\d+\z/, allow_blank: true, message: I18n.t("validations.shared.numeric.format", field: "") }
validates :phone_extension, format: { with: /\A\d+\z/, allow_blank: true, message: I18n.t("validations.not_number", field: "") }
after_validation :send_data_protection_confirmation_reminder, if: :is_dpo_changed?

1
config/locales/en.yml

@ -255,6 +255,7 @@ en:
not_answered: "You must answer %{question}"
invalid_option: "Enter a valid value for %{question}"
invalid_number: "Enter a number for %{question}"
not_number: "%{field} must be a number."
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."
date:

Loading…
Cancel
Save