File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,6 @@ traverse
264264
265265**type **: ``boolean `` **default **: ``true ``
266266
267- If this constraint is applied to a property that holds an array of objects,
268- then each object in that array will be validated only if this option is
269- set to `` true `` .
267+ If this constraint is applied to a `` Traversable ``, then all containing values
268+ will be validated if this option is set to `` true ``. This option is ignored on
269+ arrays: Arrays are traversed in either case. Keys are not validated .
Original file line number Diff line number Diff line change @@ -67,8 +67,13 @@ field as **three different choice fields**::
6767 'widget' => 'choice',
6868 ]);
6969
70- If your underlying date is *not * a ``DateTime `` object (e.g. it's a unix timestamp),
71- configure the `input `_ option.
70+ If your underlying date is *not * a ``DateTime `` object (e.g. it's a unix
71+ timestamp or a ``DateTimeImmutable `` object), configure the `input `_ option::
72+
73+ $builder->add('publishedAt', DateType::class, [
74+ 'widget' => 'choice',
75+ 'input' => 'datetime_immutable'
76+ ]);
7277
7378Rendering a single HTML5 Textbox
7479~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments