Skip to content

Commit 77c8b09

Browse files
committed
Minor tweaks
1 parent e6ad5e8 commit 77c8b09

File tree

4 files changed

+19
-27
lines changed

4 files changed

+19
-27
lines changed

reference/constraints/Negative.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Negative
55

66
The ``Negative`` constraint was introduced in Symfony 4.3.
77

8-
Validates that a value is a negative number. To force that a value is a negative
9-
number or equal to zero, see :doc:`/reference/constraints/NegativeOrZero`.
10-
To force a value is positive, see :doc:`/reference/constraints/Positive`.
8+
Validates that a value is a negative number. Zero is neither positive nor
9+
negative, so you must use :doc:`/reference/constraints/NegativeOrZero` if you
10+
want to allow zero as value.
1111

1212
========== ===================================================================
1313
Applies to :ref:`property or method <validation-property-target>`
@@ -21,9 +21,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\LesserThanValida
2121
Basic Usage
2222
-----------
2323

24-
The following constraint ensure that:
25-
26-
* the ``withdraw`` of a bankaccount ``TransferItem`` is a negative number (lesser than zero)
24+
The following constraint ensures that the ``withdraw`` of a bank account
25+
``TransferItem`` is a negative number (lesser than zero):
2726

2827
.. configuration-block::
2928

reference/constraints/NegativeOrZero.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ NegativeOrZero
55

66
The ``NegativeOrZero`` constraint was introduced in Symfony 4.3.
77

8-
Validates that a value is a negative number or equal to zero. To force that a value
9-
is only a negative number, see :doc:`/reference/constraints/Negative`.
10-
To force a value is positive or equal to zero,
11-
see :doc:`/reference/constraints/PositiveOrZero`.
8+
Validates that a value is a negative number or equal to zero. If you don't
9+
want to allow zero as value, use :doc:`/reference/constraints/Negative` instead.
1210

1311
========== ===================================================================
1412
Applies to :ref:`property or method <validation-property-target>`
@@ -22,9 +20,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\LesserThanOrEqua
2220
Basic Usage
2321
-----------
2422

25-
The following constraint ensure that:
26-
27-
* the ``level`` of a ``UnderGroundGarage`` is a negative number or equal to zero
23+
The following constraint ensures that the ``level`` of a ``UnderGroundGarage``
24+
is a negative number or equal to zero:
2825

2926
.. configuration-block::
3027

@@ -104,4 +101,4 @@ Parameter Description
104101
``{{ value }}`` The current (invalid) value
105102
============================= ================================================
106103

107-
.. include:: /reference/constraints/_payload-option.rst.inc
104+
.. include:: /reference/constraints/_payload-option.rst.inc

reference/constraints/Positive.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Positive
55

66
The ``Positive`` constraint was introduced in Symfony 4.3.
77

8-
Validates that a value is a positive number. To force that a value is positive
9-
number or equal to zero, see :doc:`/reference/constraints/PositiveOrZero`.
10-
To force a value is negative, see :doc:`/reference/constraints/Negative`.
8+
Validates that a value is a positive number. Zero is neither positive nor
9+
negative, so you must use :doc:`/reference/constraints/PositiveOrZero` if you
10+
want to allow zero as value.
1111

1212
========== ===================================================================
1313
Applies to :ref:`property or method <validation-property-target>`
@@ -21,9 +21,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanValid
2121
Basic Usage
2222
-----------
2323

24-
The following constraint ensure that:
25-
26-
* the ``income`` of an ``Employee`` is a positive number (greater than zero)
24+
The following constraint ensures that the ``income`` of an ``Employee`` is a
25+
positive number (greater than zero):
2726

2827
.. configuration-block::
2928

reference/constraints/PositiveOrZero.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ PositiveOrZero
55

66
The ``PositiveOrZero`` constraint was introduced in Symfony 4.3.
77

8-
Validates that a value is a positive number or equal to zero. To force that
9-
a value is only a positiven umber, see :doc:`/reference/constraints/Positive`.
10-
To force a value is negative or equal to zero,
11-
see :doc:`/reference/constraints/NegativeOrZero`.
8+
Validates that a value is a positive number or equal to zero. If you don't
9+
want to allow zero as value, use :doc:`/reference/constraints/Positive` instead.
1210

1311
========== ===================================================================
1412
Applies to :ref:`property or method <validation-property-target>`
@@ -22,9 +20,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqu
2220
Basic Usage
2321
-----------
2422

25-
The following constraint ensure that:
26-
27-
* the number of ``siblings`` of a ``Person`` is positive or zero
23+
The following constraint ensures that the number of ``siblings`` of a ``Person``
24+
is positive or zero:
2825

2926
.. configuration-block::
3027

0 commit comments

Comments
 (0)