diff --git a/Constraints/ChoiceValidator.php b/Constraints/ChoiceValidator.php
index 4c70fceb..a2728c64 100644
--- a/Constraints/ChoiceValidator.php
+++ b/Constraints/ChoiceValidator.php
@@ -53,6 +53,9 @@ public function validate(mixed $value, Constraint $constraint): void
throw new ConstraintDefinitionException('The Choice constraint expects a valid callback.');
}
$choices = $choices();
+ if (!is_array($choices)) {
+ throw new ConstraintDefinitionException(sprintf('The Choice constraint callback "%s" is expected to return an array, but returned "%s".', trim($this->formatValue($constraint->callback), '"'), get_debug_type($choices)));
+ }
} else {
$choices = $constraint->choices;
}
diff --git a/Resources/translations/validators.tr.xlf b/Resources/translations/validators.tr.xlf
index af59485b..93848e94 100644
--- a/Resources/translations/validators.tr.xlf
+++ b/Resources/translations/validators.tr.xlf
@@ -20,7 +20,7 @@
The value you selected is not a valid choice.
- Seçtiğiniz değer geçerli bir seçenek değil.
+ Seçtiğiniz değer geçerli bir seçenek değildir.You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.
@@ -40,7 +40,7 @@
This field is missing.
- Bu alan, eksik
+ Bu alan, eksiktirThis value is not a valid date.
@@ -60,7 +60,7 @@
The file is not readable.
- Dosya okunabilir değil.
+ Dosya okunabilir değildir.The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.
@@ -100,15 +100,15 @@
This value is not valid.
- Bu değer geçerli değil.
+ Bu değer geçerli değildir.This value is not a valid time.
- Bu değer doğru bir saat değil.
+ Bu değer doğru bir saat değildir.This value is not a valid URL.
- Bu değer doğru bir URL değil.
+ Bu değer doğru bir URL değildir.The two values should be equal.
@@ -136,11 +136,11 @@
This value is not a valid IP address.
- Bu değer geçerli bir IP adresi değil.
+ Bu değer geçerli bir IP adresi değildir.This value is not a valid language.
- Bu değer geçerli bir lisan değil.
+ Bu değer geçerli bir lisan değildir.This value is not a valid locale.
@@ -192,7 +192,7 @@
No temporary folder was configured in php.ini, or the configured folder does not exist.
- php.ini'de geçici bir klasör yapılandırılmadı, veya yapılandırılan klasör mevcut değil.
+ php.ini'de geçici bir klasör yapılandırılmadı, veya yapılandırılan klasör mevcut değildir.Cannot write temporary file to disk.
@@ -224,7 +224,7 @@
This value is not a valid International Bank Account Number (IBAN).
- Bu değer geçerli bir Uluslararası Banka Hesap Numarası (IBAN) değil.
+ Bu değer geçerli bir Uluslararası Banka Hesap Numarası (IBAN) değildir.This value is not a valid ISBN-10.
@@ -244,7 +244,7 @@
This value is not a valid currency.
- Bu değer geçerli bir para birimi değil.
+ Bu değer geçerli bir para birimi değildir.This value should be equal to {{ compared_value }}.
@@ -312,7 +312,7 @@
This value is not a valid Business Identifier Code (BIC).
- Bu değer geçerli bir İşletme Tanımlama Kodu (BIC) değil.
+ Bu değer geçerli bir İşletme Tanımlama Kodu (BIC) değildir.Error
@@ -320,7 +320,7 @@
This value is not a valid UUID.
- Bu değer geçerli bir UUID değil.
+ Bu değer geçerli bir UUID değildir.This value should be a multiple of {{ compared_value }}.
@@ -340,7 +340,7 @@
This value should be positive.
- Bu değer pozitif olmalı.
+ Bu değer pozitif olmalıdır.This value should be either positive or zero.
@@ -356,7 +356,7 @@
This value is not a valid timezone.
- Bu değer, geçerli bir saat dilimi değil.
+ Bu değer, geçerli bir saat dilimi değildir.This password has been leaked in a data breach, it must not be used. Please use another password.
@@ -368,7 +368,7 @@
This value is not a valid hostname.
- Bu değer, geçerli bir ana bilgisayar adı değil.
+ Bu değer, geçerli bir ana bilgisayar adı değildir.The number of elements in this collection should be a multiple of {{ compared_value }}.
@@ -384,7 +384,7 @@
This value is not a valid International Securities Identification Number (ISIN).
- Bu değer geçerli bir Uluslararası Menkul Kıymetler Kimlik Numarası değil (ISIN).
+ Bu değer geçerli bir Uluslararası Menkul Kıymetler Kimlik Numarası (ISIN) değildir.This value should be a valid expression.
@@ -392,11 +392,11 @@
This value is not a valid CSS color.
- Bu değer geçerli bir CSS rengi değil.
+ Bu değer geçerli bir CSS rengi değildir.This value is not a valid CIDR notation.
- Bu değer geçerli bir CIDR yazımı değil.
+ Bu değer geçerli bir CIDR yazımı değildir.The value of the netmask should be between {{ min }} and {{ max }}.
@@ -436,35 +436,35 @@
This value is not a valid MAC address.
- Bu değer geçerli bir MAC adresi değil.
+ Bu değer geçerli bir MAC adresi değildir.This URL is missing a top-level domain.
- Bu URL bir üst düzey alan adı eksik.
+ Bu URL bir üst seviye alan adı eksik.This value is too short. It should contain at least one word.|This value is too short. It should contain at least {{ min }} words.
- This value is too short. It should contain at least one word.|This value is too short. It should contain at least {{ min }} words.
+ Bu değer çok kısa. En az bir kelime içermelidir.|Bu değer çok kısa. En az {{ min }} kelime içermelidir.This value is too long. It should contain one word.|This value is too long. It should contain {{ max }} words or less.
- This value is too long. It should contain one word.|This value is too long. It should contain {{ max }} words or less.
+ Bu değer çok uzun. Tek bir kelime içermelidir.|Bu değer çok uzun. {{ max }} veya daha az kelime içermelidir.This value does not represent a valid week in the ISO 8601 format.
- This value does not represent a valid week in the ISO 8601 format.
+ Bu değer ISO 8601 formatında geçerli bir haftayı temsil etmezdir.This value is not a valid week.
- This value is not a valid week.
+ Bu değer geçerli hafta değildir.This value should not be before week "{{ min }}".
- This value should not be before week "{{ min }}".
+ Bu değer “{{ min }}” haftasından önce olmamalıdır.This value should not be after week "{{ max }}".
- This value should not be after week "{{ max }}".
+ Bu değer “{{ max }}” haftasından sonra olmamalıdır