Skip to content

Commit d68d6ab

Browse files
[Validator] Add the format option to the Ulid constraint to allow accepting different ULID formats
1 parent 5bd9db4 commit d68d6ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

reference/constraints/Ulid.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ Basic Usage
7373
Options
7474
-------
7575

76+
``format``
77+
~~~~~~~~~~
78+
79+
**type**: ``string`` **default**: ``Ulid::FORMAT_BASE_32``
80+
81+
The format of the ULID to validate. The following formats are available:
82+
83+
* ``Ulid::FORMAT_BASE_32``: The ULID is encoded in base32 (default)
84+
* ``Ulid::FORMAT_BASE_58``: The ULID is encoded in base58
85+
86+
.. versionadded:: 7.2
87+
88+
The ``format`` option was introduced in Symfony 7.2.
89+
7690
.. include:: /reference/constraints/_groups-option.rst.inc
7791

7892
``message``

0 commit comments

Comments
 (0)