File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -430,6 +430,16 @@ attribute in your controller::
430
430
// ...
431
431
}
432
432
433
+ You can customize the validation groups used during the mapping thanks to the
434
+ ``validationGroups `` option::
435
+
436
+ public function dashboard(
437
+ #[MapQueryString(validationGroups: ['strict', 'edit'])] UserDTO $userDto
438
+ ): Response
439
+ {
440
+ // ...
441
+ }
442
+
433
443
.. versionadded :: 6.3
434
444
435
445
The :class: `Symfony\\ Component\\ HttpKernel\\ Attribute\\ MapQueryString ` attribute
@@ -482,6 +492,16 @@ your DTO::
482
492
// ...
483
493
}
484
494
495
+ You can also customize the validation groups used as well as supported
496
+ payload formats::
497
+
498
+ public function dashboard(
499
+ #[MapRequestPayload(acceptFormat: 'json', validationGroups: ['strict', 'read'])] UserDTO $userDto
500
+ ): Response
501
+ {
502
+ // ...
503
+ }
504
+
485
505
.. versionadded :: 6.3
486
506
487
507
The :class: `Symfony\\ Component\\ HttpKernel\\ Attribute\\ MapRequestPayload ` attribute
You can’t perform that action at this time.
0 commit comments