public function validate(RequestDataBag $post): JsonResponse
    {
        $this->templateRenderer->render($post->get('contentHtml', ''), []);
        $this->templateRenderer->render($post->get('contentPlain', ''), []);

        return new JsonResponse(null, Response::HTTP_NO_CONTENT);
    }
public function validate(RequestDataBag $post): JsonResponse
    {
        $this->templateRenderer->render($post->get('contentHtml', ''), []);
        $this->templateRenderer->render($post->get('contentPlain', ''), []);

        return new JsonResponse(null, Response::HTTP_NO_CONTENT);
    }
public function validate ( RequestDataBag $ post ) : JsonResponse { $ this -> templateRenderer -> render ( $ post -> get ( 'contentHtml' , '' ) , [ ] ) ; $ this -> templateRenderer -> render ( $ post -> get ( 'contentPlain' , '' ) , [ ] ) ; return new JsonResponse ( null , Response :: HTTP_NO_CONTENT ) ; }
Validates if an email template can be rendered without sending an email

@Route("/api/v{version}/_action/mail-template/validate", name="api.action.mail_template.validate", methods={"POST"})

@throws StringTemplateRenderingException
Validates if an email template can be rendered without sending an email