Skip to content

Commit d921342

Browse files
Merge branch '3.4' into 4.1
* 3.4: Fix CS Allow reuse of Session between requests [MonologBridge] Re-add option option to ignore empty context and extra data [Lock] remove useless code [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file Provide debug_backtrace with proper args [DI] fix infinite loop involving self-references in decorated services forward false label option to nested types forward the invalid_message option in date types
2 parents 7d94a4f + b5ad792 commit d921342

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Extension/Core/Type/DateType.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ public function buildForm(FormBuilderInterface $builder, array $options)
7878
'error_bubbling' => true,
7979
);
8080

81+
if (isset($options['invalid_message'])) {
82+
$dayOptions['invalid_message'] = $options['invalid_message'];
83+
$monthOptions['invalid_message'] = $options['invalid_message'];
84+
$yearOptions['invalid_message'] = $options['invalid_message'];
85+
}
86+
87+
if (isset($options['invalid_message_parameters'])) {
88+
$dayOptions['invalid_message_parameters'] = $options['invalid_message_parameters'];
89+
$monthOptions['invalid_message_parameters'] = $options['invalid_message_parameters'];
90+
$yearOptions['invalid_message_parameters'] = $options['invalid_message_parameters'];
91+
}
92+
8193
$formatter = new \IntlDateFormatter(
8294
\Locale::getDefault(),
8395
$dateFormat,

Extension/Core/Type/TimeType.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ public function buildForm(FormBuilderInterface $builder, array $options)
7373
'error_bubbling' => true,
7474
);
7575

76+
if (isset($options['invalid_message'])) {
77+
$hourOptions['invalid_message'] = $options['invalid_message'];
78+
$minuteOptions['invalid_message'] = $options['invalid_message'];
79+
$secondOptions['invalid_message'] = $options['invalid_message'];
80+
}
81+
82+
if (isset($options['invalid_message_parameters'])) {
83+
$hourOptions['invalid_message_parameters'] = $options['invalid_message_parameters'];
84+
$minuteOptions['invalid_message_parameters'] = $options['invalid_message_parameters'];
85+
$secondOptions['invalid_message_parameters'] = $options['invalid_message_parameters'];
86+
}
87+
7688
if ('choice' === $options['widget']) {
7789
$hours = $minutes = array();
7890

0 commit comments

Comments
 (0)