@@ -298,7 +298,7 @@ rules). In order to validate an object, simply map one or more constraints
298
298
to its class and then pass it to the ``validator `` service.
299
299
300
300
Behind the scenes, a constraint is simply a PHP object that makes an assertive
301
- statement. In real life, a constraint could be: 'The cake must not be burned'.
301
+ statement. In real life, a constraint could be: `` 'The cake must not be burned' `` .
302
302
In Symfony, constraints are similar: they are assertions that a condition
303
303
is true. Given a value, a constraint will tell you if that value
304
304
adheres to the rules of the constraint.
@@ -342,7 +342,7 @@ literature genre mostly associated with the author, which can be set to either
342
342
{
343
343
/**
344
344
* @Assert\Choice(
345
- * choices = { "fiction", "non-fiction" },
345
+ * choices = {"fiction", "non-fiction"},
346
346
* message = "Choose a valid genre."
347
347
* )
348
348
*/
@@ -509,7 +509,7 @@ of the form fields::
509
509
$builder
510
510
->add('myField', TextType::class, [
511
511
'required' => true,
512
- 'constraints' => [new Length(['min' => 3])]
512
+ 'constraints' => [new Length(['min' => 3])],
513
513
])
514
514
;
515
515
}
@@ -606,7 +606,7 @@ class to have at least 3 characters.
606
606
$metadata->addPropertyConstraint('firstName', new Assert\NotBlank());
607
607
$metadata->addPropertyConstraint(
608
608
'firstName',
609
- new Assert\Length([" min" => 3])
609
+ new Assert\Length([' min' => 3])
610
610
);
611
611
}
612
612
}
0 commit comments