-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Custom Validation Messages With localization support
- Loading branch information
Showing
24 changed files
with
300 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Sources/ValidatorKit/Resources/Localization/ar.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Localizable.strings | ||
// ValidatorKit | ||
// | ||
// Created by Alhiane on 26/9/2024. | ||
// | ||
|
||
/* Localizable.strings (Arabic) */ | ||
"validation.custom" = "فشلت عملية التحقق."; | ||
"validation.email" = "يرجى إدخال عنوان بريد إلكتروني صالح."; | ||
"validation.min" = "يجب أن تكون القيمة على الأقل %@."; | ||
"validation.max" = "يجب ألا تتجاوز القيمة %@."; | ||
"validation.numeric" = "يرجى إدخال قيمة رقمية."; | ||
"validation.date" = "يرجى إدخال تاريخ صالح."; | ||
"validation.range" = "يجب أن تكون القيمة بين %@ و %@."; | ||
"validation.pattern" = "القيمة لا تتطابق مع النموذج المطلوب."; | ||
"validation.url" = "يرجى إدخال عنوان URL صالح."; | ||
"validation.inArray" = "يجب أن تكون القيمة واحدة من الخيارات المسموح بها."; | ||
"validation.requiredIf" = "هذا الحقل مطلوب بناءً على الشرط المحدد."; | ||
"validation.required" = "هذا الحقل مطلوب."; | ||
"validation.greaterThan" = "يجب أن تكون القيمة أكبر من %@."; | ||
"validation.lessThan" = "يجب أن تكون القيمة أقل من %@."; | ||
"validation.mimeTypes" = "يجب أن يكون نوع الملف واحدًا من الأنواع المسموح بها: %@."; | ||
|
24 changes: 24 additions & 0 deletions
24
Sources/ValidatorKit/Resources/Localization/en.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Localizable.strings | ||
// ValidatorKit | ||
// | ||
// Created by Alhiane on 26/9/2024. | ||
// | ||
|
||
/* Localizable.strings (English) */ | ||
"validation.custom" = "Validation failed."; | ||
"validation.email" = "Please enter a valid email address."; | ||
"validation.min" = "Value must be at least %@."; | ||
"validation.max" = "Value must be no more than %@."; | ||
"validation.numeric" = "Please enter a numeric value."; | ||
"validation.date" = "Please enter a valid date."; | ||
"validation.range" = "Value must be between %@ and %@."; | ||
"validation.pattern" = "Value does not match the required pattern."; | ||
"validation.url" = "Please enter a valid URL."; | ||
"validation.inArray" = "Value must be one of the allowed options."; | ||
"validation.requiredIf" = "This field is required based on the specified condition."; | ||
"validation.required" = "This field is required."; | ||
"validation.greaterThan" = "Value must be greater than %@."; | ||
"validation.lessThan" = "Value must be less than %@."; | ||
"validation.mimeTypes" = "File type must be one of the allowed types: %@."; | ||
|
23 changes: 23 additions & 0 deletions
23
Sources/ValidatorKit/Resources/Localization/es.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Localizable.strings | ||
// ValidatorKit | ||
// | ||
// Created by Alhiane on 26/9/2024. | ||
// | ||
|
||
/* Localizable.strings (Spanish) */ | ||
"validation.custom" = "La validación falló."; | ||
"validation.email" = "Por favor, introduce una dirección de correo electrónico válida."; | ||
"validation.min" = "El valor debe ser al menos %@."; | ||
"validation.max" = "El valor no debe exceder %@."; | ||
"validation.numeric" = "Por favor, introduce un valor numérico."; | ||
"validation.date" = "Por favor, introduce una fecha válida."; | ||
"validation.range" = "El valor debe estar entre %@ y %@."; | ||
"validation.pattern" = "El valor no coincide con el patrón requerido."; | ||
"validation.url" = "Por favor, introduce una URL válida."; | ||
"validation.inArray" = "El valor debe ser una de las opciones permitidas."; | ||
"validation.requiredIf" = "Este campo es obligatorio según la condición especificada."; | ||
"validation.required" = "Este campo es obligatorio."; | ||
"validation.greaterThan" = "El valor debe ser mayor que %@."; | ||
"validation.lessThan" = "El valor debe ser menor que %@."; | ||
"validation.mimeTypes" = "El tipo de archivo debe ser uno de los tipos permitidos: %@."; |
24 changes: 24 additions & 0 deletions
24
Sources/ValidatorKit/Resources/Localization/fr.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Localizable.strings | ||
// ValidatorKit | ||
// | ||
// Created by Alhiane on 26/9/2024. | ||
// | ||
|
||
/* Localizable.strings (French) */ | ||
"validation.custom" = "La validation a échoué."; | ||
"validation.email" = "Veuillez saisir une adresse e-mail valide."; | ||
"validation.min" = "La valeur doit être au moins %@."; | ||
"validation.max" = "La valeur ne doit pas dépasser %@."; | ||
"validation.numeric" = "Veuillez saisir une valeur numérique."; | ||
"validation.date" = "Veuillez saisir une date valide."; | ||
"validation.range" = "La valeur doit être entre %@ et %@."; | ||
"validation.pattern" = "La valeur ne correspond pas au modèle requis."; | ||
"validation.url" = "Veuillez saisir une URL valide."; | ||
"validation.inArray" = "La valeur doit être l'une des options autorisées."; | ||
"validation.requiredIf" = "Ce champ est obligatoire en fonction de la condition spécifiée."; | ||
"validation.required" = "Ce champ est obligatoire."; | ||
"validation.greaterThan" = "La valeur doit être supérieure à %@."; | ||
"validation.lessThan" = "La valeur doit être inférieure à %@."; | ||
"validation.mimeTypes" = "Le type de fichier doit être l'un des types autorisés : %@."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.