File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 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::
430430 // ...
431431 }
432432
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+
433443.. versionadded :: 6.3
434444
435445 The :class: `Symfony\\ Component\\ HttpKernel\\ Attribute\\ MapQueryString ` attribute
@@ -482,6 +492,16 @@ your DTO::
482492 // ...
483493 }
484494
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+
485505.. versionadded :: 6.3
486506
487507 The :class: `Symfony\\ Component\\ HttpKernel\\ Attribute\\ MapRequestPayload ` attribute
You can’t perform that action at this time.
0 commit comments