Skip to content

Commit a9cfb3a

Browse files
committed
minor #12712 Tweak the IsTrue validation docs (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #12712). Discussion ---------- Tweak the IsTrue validation docs Please review that this is correct: *IsTrue requires that method names start with "is" or "get"* Thanks! Commits ------- c47d8ae Tweak the IsTrue validation docs
2 parents 3750f3c + c47d8ae commit a9cfb3a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

reference/constraints/IsTrue.rst

+6-7
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

@@ -23,9 +22,9 @@ Basic Usage
2322
-----------
2423

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

3029
// src/AppBundle/Entity/Author.php
3130
namespace AppBundle\Entity;
@@ -40,7 +39,7 @@ For example, suppose you have the following method::
4039
}
4140
}
4241

43-
Then you can constrain this method with ``IsTrue``.
42+
Then you can validate this method with ``IsTrue`` as follows:
4443

4544
.. configuration-block::
4645

0 commit comments

Comments
 (0)