|
| 1 | +.. index:: |
| 2 | + single: Forms; Fields; UuidType |
| 3 | + |
| 4 | +UlidType Field |
| 5 | +============== |
| 6 | + |
| 7 | +.. versionadded:: 5.3 |
| 8 | + |
| 9 | + The ``UlidType`` field was introduced in Symfony 5.3. |
| 10 | + |
| 11 | +Renders an input text field with the ULID string value and transforms it back to |
| 12 | +a proper :ref:`Ulid object <ulid>` when submitting the form. |
| 13 | + |
| 14 | ++---------------------------+-----------------------------------------------------------------------+ |
| 15 | +| Rendered as | ``input`` ``text`` field | |
| 16 | ++---------------------------+-----------------------------------------------------------------------+ |
| 17 | +| Options | (none) | |
| 18 | ++---------------------------+-----------------------------------------------------------------------+ |
| 19 | +| Overridden options | - `compound`_ | |
| 20 | +| | - `invalid_message`_ | |
| 21 | ++---------------------------+-----------------------------------------------------------------------+ |
| 22 | +| Inherited options | - `attr`_ | |
| 23 | +| | - `data`_ | |
| 24 | +| | - `disabled`_ | |
| 25 | +| | - `empty_data`_ | |
| 26 | +| | - `error_bubbling`_ | |
| 27 | +| | - `error_mapping`_ | |
| 28 | +| | - `help`_ | |
| 29 | +| | - `help_attr`_ | |
| 30 | +| | - `help_html`_ | |
| 31 | +| | - `invalid_message_parameters`_ | |
| 32 | +| | - `label`_ | |
| 33 | +| | - `label_attr`_ | |
| 34 | +| | - `label_format`_ | |
| 35 | +| | - `mapped`_ | |
| 36 | +| | - `required`_ | |
| 37 | +| | - `row_attr`_ | |
| 38 | ++---------------------------+-----------------------------------------------------------------------+ |
| 39 | +| Default invalid message | Please enter a valid ULID. | |
| 40 | ++---------------------------+-----------------------------------------------------------------------+ |
| 41 | +| Legacy invalid message | The value {{ value }} is not valid. | |
| 42 | ++---------------------------+-----------------------------------------------------------------------+ |
| 43 | +| Parent type | :doc:`FormType </reference/forms/types/form>` | |
| 44 | ++---------------------------+-----------------------------------------------------------------------+ |
| 45 | +| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\UlidType` | |
| 46 | ++---------------------------+-----------------------------------------------------------------------+ |
| 47 | + |
| 48 | +.. include:: /reference/forms/types/options/_debug_form.rst.inc |
| 49 | + |
| 50 | +Overridden Options |
| 51 | +------------------ |
| 52 | + |
| 53 | +.. include:: /reference/forms/types/options/compound_type.rst.inc |
| 54 | + |
| 55 | +.. include:: /reference/forms/types/options/invalid_message.rst.inc |
| 56 | + |
| 57 | +Inherited Options |
| 58 | +----------------- |
| 59 | + |
| 60 | +These options inherit from the :doc:`FormType </reference/forms/types/form>`: |
| 61 | + |
| 62 | +.. include:: /reference/forms/types/options/attr.rst.inc |
| 63 | + |
| 64 | +.. include:: /reference/forms/types/options/data.rst.inc |
| 65 | + |
| 66 | +.. include:: /reference/forms/types/options/disabled.rst.inc |
| 67 | + |
| 68 | +.. include:: /reference/forms/types/options/empty_data.rst.inc |
| 69 | + :end-before: DEFAULT_PLACEHOLDER |
| 70 | + |
| 71 | +The default value is ``''`` (the empty string). |
| 72 | + |
| 73 | +.. include:: /reference/forms/types/options/empty_data.rst.inc |
| 74 | + :start-after: DEFAULT_PLACEHOLDER |
| 75 | + |
| 76 | +.. include:: /reference/forms/types/options/error_bubbling.rst.inc |
| 77 | + |
| 78 | +.. include:: /reference/forms/types/options/error_mapping.rst.inc |
| 79 | + |
| 80 | +.. include:: /reference/forms/types/options/help.rst.inc |
| 81 | + |
| 82 | +.. include:: /reference/forms/types/options/help_attr.rst.inc |
| 83 | + |
| 84 | +.. include:: /reference/forms/types/options/help_html.rst.inc |
| 85 | + |
| 86 | +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc |
| 87 | + |
| 88 | +.. include:: /reference/forms/types/options/label.rst.inc |
| 89 | + |
| 90 | +.. include:: /reference/forms/types/options/label_attr.rst.inc |
| 91 | + |
| 92 | +.. include:: /reference/forms/types/options/label_format.rst.inc |
| 93 | + |
| 94 | +.. include:: /reference/forms/types/options/mapped.rst.inc |
| 95 | + |
| 96 | +.. include:: /reference/forms/types/options/required.rst.inc |
| 97 | + |
| 98 | +.. include:: /reference/forms/types/options/row_attr.rst.inc |
0 commit comments