File tree Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 11Date
22====
33
4- Validates that a value is a valid date, meaning either a ``DateTime `` object
5- or a string (or an object that can be cast into a string) that follows a
6- valid YYYY-MM-DD format.
4+ Validates that a value is a valid date, meaning a string (or an object that can be cast into a string)
5+ that follows a valid YYYY-MM-DD format.
76
87+----------------+--------------------------------------------------------------------+
98| Applies to | :ref: `property or method <validation-property-target >` |
@@ -32,6 +31,7 @@ Basic Usage
3231 {
3332 /**
3433 * @Assert\Date()
34+ * @var string A "Y-m-d" formatted value
3535 */
3636 protected $birthday;
3737 }
@@ -69,6 +69,11 @@ Basic Usage
6969
7070 class Author
7171 {
72+ /**
73+ * @var string A "Y-m-d" formatted value
74+ */
75+ protected $birthday;
76+
7277 public static function loadValidatorMetadata(ClassMetadata $metadata)
7378 {
7479 $metadata->addPropertyConstraint('birthday', new Assert\Date());
Original file line number Diff line number Diff line change 11DateTime
22========
33
4- Validates that a value is a valid "datetime", meaning either a ``DateTime ``
5- object or a string (or an object that can be cast into a string) that follows
6- a specific format.
4+ Validates that a value is a valid "datetime", meaning a string (or an object that can be cast into a string)
5+ that follows a specific format.
76
87+----------------+------------------------------------------------------------------------+
98| Applies to | :ref: `property or method <validation-property-target >` |
@@ -33,6 +32,7 @@ Basic Usage
3332 {
3433 /**
3534 * @Assert\DateTime()
35+ * @var string A "Y-m-d H:i:s" formatted value
3636 */
3737 protected $createdAt;
3838 }
@@ -70,6 +70,11 @@ Basic Usage
7070
7171 class Author
7272 {
73+ /**
74+ * @var string A "Y-m-d H:i:s" formatted value
75+ */
76+ protected $createdAt;
77+
7378 public static function loadValidatorMetadata(ClassMetadata $metadata)
7479 {
7580 $metadata->addPropertyConstraint('createdAt', new Assert\DateTime());
Original file line number Diff line number Diff line change 11Time
22====
33
4- Validates that a value is a valid time, meaning an object implementing
5- ``DateTimeInterface `` or a string (or an object that can be cast into a string)
4+ Validates that a value is a valid time, meaning a string (or an object that can be cast into a string)
65that follows a valid ``HH:MM:SS `` format.
76
87+----------------+------------------------------------------------------------------------+
@@ -35,6 +34,7 @@ of the day when the event starts:
3534 {
3635 /**
3736 * @Assert\Time()
37+ * @var string A "H:i:s" formatted value
3838 */
3939 protected $startsAt;
4040 }
@@ -72,6 +72,11 @@ of the day when the event starts:
7272
7373 class Event
7474 {
75+ /**
76+ * @var string A "H:i:s" formatted value
77+ */
78+ protected $startsAt;
79+
7580 public static function loadValidatorMetadata(ClassMetadata $metadata)
7681 {
7782 $metadata->addPropertyConstraint('startsAt', new Assert\Time());
You can’t perform that action at this time.
0 commit comments