Skip to content

Commit 336d8ae

Browse files
authored
[Validator] Use single quotes for a string
1 parent 60cd0f7 commit 336d8ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

validation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ rules). In order to validate an object, simply map one or more constraints
298298
to its class and then pass it to the ``validator`` service.
299299

300300
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'``.
302302
In Symfony, constraints are similar: they are assertions that a condition
303303
is true. Given a value, a constraint will tell you if that value
304304
adheres to the rules of the constraint.
@@ -342,7 +342,7 @@ literature genre mostly associated with the author, which can be set to either
342342
{
343343
/**
344344
* @Assert\Choice(
345-
* choices = { "fiction", "non-fiction" },
345+
* choices = {"fiction", "non-fiction"},
346346
* message = "Choose a valid genre."
347347
* )
348348
*/
@@ -509,7 +509,7 @@ of the form fields::
509509
$builder
510510
->add('myField', TextType::class, [
511511
'required' => true,
512-
'constraints' => [new Length(['min' => 3])]
512+
'constraints' => [new Length(['min' => 3])],
513513
])
514514
;
515515
}
@@ -606,7 +606,7 @@ class to have at least 3 characters.
606606
$metadata->addPropertyConstraint('firstName', new Assert\NotBlank());
607607
$metadata->addPropertyConstraint(
608608
'firstName',
609-
new Assert\Length(["min" => 3])
609+
new Assert\Length(['min' => 3])
610610
);
611611
}
612612
}

0 commit comments

Comments
 (0)