Skip to content

Commit 1fbf702

Browse files
committed
Document allowNullableNull change.
1 parent 6ae3a88 commit 1fbf702

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

en/appendices/5-3-migration-guide.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ Validation
177177
- ``ipOrRange()`` validation has has been added to check for an IP or a range (subnet).
178178
- When validating within CakePHP marshalling context, the entity will be passed into the ``context`` argument for use inside custom validation rules.
179179
This can be useful when patching partially and then needing to get that data from the entity instead of the passed data.
180+
- ``existsInNullable()`` rule has been added. This rule allows ``null`` values in nullable composite foreign keys,
181+
which is semantically correct for optional relationships. Use ``$rules->existsInNullable(['author_id', 'site_id'], 'SiteAuthors')``
182+
instead of ``existsIn()`` when you want to permit null values in foreign keys.
180183

181184
View
182185
----

0 commit comments

Comments
 (0)