diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index c5bb19fa89f..5ccc42bdb29 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -157,7 +157,7 @@ stores an ``Address`` instance in the ``$address`` property:: { $metadata->addPropertyConstraint('street', new Assert\NotBlank()); $metadata->addPropertyConstraint('zipCode', new Assert\NotBlank()); - $metadata->addPropertyConstraint('zipCode', new Assert\Length(["max" => 5])); + $metadata->addPropertyConstraint('zipCode', new Assert\Length(['max' => 5])); } } @@ -172,7 +172,7 @@ stores an ``Address`` instance in the ``$address`` property:: public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addPropertyConstraint('firstName', new Assert\NotBlank()); - $metadata->addPropertyConstraint('firstName', new Assert\Length(["min" => 4])); + $metadata->addPropertyConstraint('firstName', new Assert\Length(['min' => 4])); $metadata->addPropertyConstraint('lastName', new Assert\NotBlank()); } }