diff --git a/templating/formats.rst b/templating/formats.rst index aab13d049f4..ad00ddab428 100644 --- a/templating/formats.rst +++ b/templating/formats.rst @@ -51,7 +51,7 @@ be configured so that ``/about-us`` sets the request format to ``html`` while special ``_format`` placeholder in your route definition:: /** - * @Route("/{slug}.{_format}", defaults={"_format"="html"}) + * @Route("/{slug}.{_format}", defaults={"_format"="html"}, requirements={"_format"="html|xml"})) */ public function showAction(Request $request, $slug) {