Skip to content

Commit 3aec111

Browse files
committed
docs(validation): clarify date default type
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent d63d0eb commit 3aec111

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

user_guide_src/source/libraries/validation.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,8 @@ All methods support dot-array syntax for nested validated data.
524524
* ``date($key, $format = null, $timezone = null, $default = null)`` returns
525525
:php:class:`CodeIgniter\\I18n\\Time` or ``null``. If the field is missing, it
526526
returns the default value or ``null``. Pass a format when the value should be
527-
parsed with a specific date format.
527+
parsed with a specific date format. The default value must be ``null`` or a
528+
:php:class:`CodeIgniter\\I18n\\Time` instance.
528529
* ``enum($key, $enumClass, $default = null)`` returns an enum instance or
529530
``null``. The default value must be ``null`` or an instance of the requested
530531
enum class.

0 commit comments

Comments
 (0)