Skip to content

[WCM][Validator] Update datetime validator #7583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions reference/constraints/Date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ valid YYYY-MM-DD format.
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\DateValidator` |
+----------------+--------------------------------------------------------------------+

.. caution::

The :class:`Symfony\\Component\\Validator\\Constraints\\Date` is deprecated since version 3.3
and will be removed in 4.0. Use :class:`Symfony\\Component\\Validator\\Constraints\\DateTime` instead.

Basic Usage
-----------

Expand Down
4 changes: 1 addition & 3 deletions reference/constraints/DateTime.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
DateTime
========

Validates that a value is a valid "datetime", meaning either a ``DateTime``
object or a string (or an object that can be cast into a string) that follows
a specific format.
Validates that a value is a valid "datetime" that follows a specific format.

+----------------+------------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
Expand Down
5 changes: 5 additions & 0 deletions reference/constraints/Time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ that follows a valid ``HH:MM:SS`` format.
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\TimeValidator` |
+----------------+------------------------------------------------------------------------+

.. caution::

The :class:`Symfony\\Component\\Validator\\Constraints\\Time` is deprecated since version 3.3
and will be removed in 4.0. Use :class:`Symfony\\Component\\Validator\\Constraints\\DateTime` instead.

Basic Usage
-----------

Expand Down