WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using an email address that already exists in the system.
| | - `entityClass`_ |
| | - `errorPath`_ |
| | - `ignoreNull`_ |
| | - `ignoreFalse`_ |
| | - `payload`_ |
+----------------+-------------------------------------------------------------------------------------+
| Class | :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntity` |
Expand Down Expand Up @@ -286,6 +287,16 @@ entities to have a ``null`` value for a field without failing validation.
If set to ``false``, only one ``null`` value is allowed - if a second entity
also has a ``null`` value, validation would fail.

ignoreFalse
~~~~~~~~~~~

**type**: ``boolean`` **default**: ``false``

If this option is set to ``true``, then the constraint will allow multiple
entities to have a ``false`` value for a boolean field without failing validation.
If set to ``false``, only one ``false`` value is allowed - if a second entity
also has a ``false`` value, validation would fail.

.. include:: /reference/constraints/_payload-option.rst.inc

.. _`race conditions`: https://en.wikipedia.org/wiki/Race_condition