Skip to content

Commit f76d264

Browse files
committed
docs: Add documentation about new constraint option withSeconds
1 parent 57e16fe commit f76d264

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

reference/constraints/Time.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,18 @@ Parameter Description
101101
``{{ label }}`` Corresponding form field label
102102
=============== ==============================================================
103103

104+
``withSeconds``
105+
~~~~~~~~~~~~~~~
106+
107+
**type**: ``boolean`` **default**: ``true``
108+
109+
This option allows you to specify whether the time should include seconds.
110+
111+
========= =============================== ============== ================
112+
Option Pattern Correct value Incorrect value
113+
========= =============================== ============== ================
114+
``true`` ``/^(\d{2}):(\d{2}):(\d{2})$/`` ``12:00:00`` ``12:00``
115+
``false`` ``/^(\d{2}):(\d{2})$/`` ``12:00`` ``12:00:00``
116+
========= =============================== ============== ================
117+
104118
.. include:: /reference/constraints/_payload-option.rst.inc

0 commit comments

Comments
 (0)