Skip to content

Commit

Permalink
Add a note on DocumentType
Browse files Browse the repository at this point in the history
  • Loading branch information
malarzm committed Mar 13, 2019
1 parent 152749a commit 91505b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Resources/doc/form_validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Form & Validation
DocumentType
------------

TODO
This bundle provides a ``DocumentType`` to be used with the Symfony's Form
component. As ``DocumentType`` extends the `EntityType`_ provided by Symfony's
Doctrine bridge you can use all options available for the ORM users. The only
difference is that ``DocumentType`` expects the ``DocumentManager`` name or
instance passed with the ``document_manager`` option instead of ``em``.

Unique constraint
-----------------
Expand All @@ -17,4 +21,5 @@ The ``Unique`` constraint shares the same options as `UniqueEntity`_, which
means that the ``em`` option should be used if you wish to specify the document
manager explicitly instead of having it be inferred from the document class.

.. _`EntityType`: https://symfony.com/doc/current/reference/forms/types/entity.html
.. _`UniqueEntity`: http://symfony.com/doc/current/reference/constraints/UniqueEntity.html

0 comments on commit 91505b0

Please sign in to comment.