From 94b346aa3e33eb35f9e132604da0014cfd7d7f81 Mon Sep 17 00:00:00 2001 From: lbayerl Date: Thu, 1 Oct 2015 13:41:18 +0200 Subject: [PATCH] incorrect: severity is an array key here and not a constant see http://stackoverflow.com/questions/31701947/how-to-use-symfony-2-6-validations-payload-with-annotation/32826742#comment53602501_32826742 for details --- cookbook/validation/severity.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/validation/severity.rst b/cookbook/validation/severity.rst index 26c5d8520ec..22cb267d6c3 100644 --- a/cookbook/validation/severity.rst +++ b/cookbook/validation/severity.rst @@ -38,17 +38,17 @@ Use the ``payload`` option to configure the error level for each constraint: class User { /** - * @Assert\NotBlank(payload = {severity = "error"}) + * @Assert\NotBlank(payload = {"severity" = "error"}) */ protected $username; /** - * @Assert\NotBlank(payload = {severity = "error"}) + * @Assert\NotBlank(payload = {"severity" = "error"}) */ protected $password; /** - * @Assert\Iban(payload = {severity = "warning"}) + * @Assert\Iban(payload = {"severity" = "warning"}) */ protected $bankAccountNumber; }