8000 Merge branch '3.4' into 4.3 · symfony/symfony-docs@18ea03a · GitHub
[go: up one dir, main page]

Skip to content

Commit 18ea03a

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: Tweak the IsTrue validation docs
2 parents 48a1861 + a9cfb3a commit 18ea03a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

reference/constraints/IsTrue.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
IsTrue
22
======
33

4-
Validates that a value is ``true``. Specifically, this checks to see if
5-
the value is exactly ``true``, exactly the integer ``1``, or exactly the
6-
string "``1``".
4+
Validates that a value is ``true``. Specifically, this checks if the value is
5+
exactly ``true``, exactly the integer ``1``, or exactly the string ``"1"``.
76

87
Also see :doc:`IsFalse <IsFalse>`.
98

@@ -20,9 +19,9 @@ Basic Usage
2019
-----------
2120

2221
This constraint can be applied to properties (e.g. a ``termsAccepted`` property
23-
on a registration model) or to a "getter" method. It's most powerful in
24-
the latter case, where you can assert that a method returns a true value.
25-
For example, suppose you have the following method::
22+
on a registration model) and methods. It's most powerful in the latter case,
23+
where you can assert that a method returns a true value. For example, suppose
24+
you have the following method::
2625

2726
// src/Entity/Author.php
2827
namespace App\Entity;
@@ -37,7 +36,7 @@ For example, suppose you have the following method::
3736
}
3837
}
3938

40-
Then you can constrain this method with ``IsTrue``.
39+
Then you can validate this method with ``IsTrue`` as follows:
4140

4241
.. configuration-block::
4342

0 commit comments

Comments
 (0)
0