Skip to content

Commit 238a94f

Browse files
committed
minor #14944 [Validator] Use single quotes for a string (wkania)
This PR was merged into the 4.4 branch. Discussion ---------- [Validator] Use single quotes for a string <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- 336d8ae [Validator] Use single quotes for a string
2 parents 90ff798 + 336d8ae commit 238a94f

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)