From f15a86ace38f048f4f4b414b76707b8d02e5138c Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Sat, 24 Oct 2020 19:12:40 -0500 Subject: [PATCH] Copy default yup locale info into rails locale --- config/locales/yup.en.yml | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config/locales/yup.en.yml diff --git a/config/locales/yup.en.yml b/config/locales/yup.en.yml new file mode 100644 index 00000000..c97664ee --- /dev/null +++ b/config/locales/yup.en.yml @@ -0,0 +1,41 @@ +en: + yup: + mixed: + default: "%{path} is invalid" + required: "%{path} is a required field" + oneOf: "%{path} must be one of the following values: %{values}" + notOneOf: "%{path} must not be one of the following values: %{values}" + defined: "%{path} must be defined" + string: + length: "%{path} must be exactly %{length} characters" + min: "%{path} must be at least %{min} characters" + max: "%{path} must be at most %{max} characters" + matches: "%{path} must match the following: \"%{regex}\"" + email: "%{path} must be a valid email" + url: "%{path} must be a valid URL" + uuid: "%{path} must be a valid UUID" + trim: "%{path} must be a trimmed string" + lowercase: "%{path} must be a lowercase string" + uppercase: "%{path} must be a upper case string" + number: + min: "%{path} must be greater than or equal to %{min}" + max: "%{path} must be less than or equal to %{max}" + lessThan: "%{path} must be less than %{less}" + moreThan: "%{path} must be greater than %{more}" + notEqual: "%{path} must be not equal to %{notEqual}" + positive: "%{path} must be a positive number" + negative: "%{path} must be a negative number" + integer: "%{path} must be an integer" + date: + min: "%{path} field must be later than %{min}" + max: "%{path} field must be at earlier than %{max}" + object: + noUnknown: "%{path} field has unspecified keys: %{unknown}" + array: + min: "%{path} field must have at least %{min} items" + max: "%{path} field must have less than or equal to %{max} items" + + + + +