File tree Expand file tree Collapse file tree 4 files changed +19
-27
lines changed Expand file tree Collapse file tree 4 files changed +19
-27
lines changed Original file line number Diff line number Diff line change 5
5
6
6
The ``Negative `` constraint was introduced in Symfony 4.3.
7
7
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 .
11
11
12
12
========== ===================================================================
13
13
Applies to :ref: `property or method <validation-property-target >`
@@ -21,9 +21,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\LesserThanValida
21
21
Basic Usage
22
22
-----------
23
23
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):
27
26
28
27
.. configuration-block ::
29
28
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ NegativeOrZero
5
5
6
6
The ``NegativeOrZero `` constraint was introduced in Symfony 4.3.
7
7
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.
12
10
13
11
========== ===================================================================
14
12
Applies to :ref: `property or method <validation-property-target >`
@@ -22,9 +20,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\LesserThanOrEqua
22
20
Basic Usage
23
21
-----------
24
22
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:
28
25
29
26
.. configuration-block ::
30
27
@@ -104,4 +101,4 @@ Parameter Description
104
101
``{{ value }} `` The current (invalid) value
105
102
============================= ================================================
106
103
107
- .. include :: /reference/constraints/_payload-option.rst.inc
104
+ .. include :: /reference/constraints/_payload-option.rst.inc
Original file line number Diff line number Diff line change 5
5
6
6
The ``Positive `` constraint was introduced in Symfony 4.3.
7
7
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 .
11
11
12
12
========== ===================================================================
13
13
Applies to :ref: `property or method <validation-property-target >`
@@ -21,9 +21,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanValid
21
21
Basic Usage
22
22
-----------
23
23
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):
27
26
28
27
.. configuration-block ::
29
28
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ PositiveOrZero
5
5
6
6
The ``PositiveOrZero `` constraint was introduced in Symfony 4.3.
7
7
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.
12
10
13
11
========== ===================================================================
14
12
Applies to :ref: `property or method <validation-property-target >`
@@ -22,9 +20,8 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqu
22
20
Basic Usage
23
21
-----------
24
22
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:
28
25
29
26
.. configuration-block ::
30
27
You can’t perform that action at this time.
0 commit comments