Skip to content

Commit 395837a

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Validation
2727

2828
- The signature of ``Validator::validate(array $data, bool $newRecord = true, array $context = [])`` has now a additional third parameter ``$context``.
2929
It can be used to pass necessary context into the validation when marshalling.
30+
- The ``existsIn`` validation rule now defaults ``allowNullableNulls`` to ``true`` instead of ``false``.
31+
This means that ``null`` values in nullable foreign keys will pass validation by default, which is more
32+
semantically correct for optional relationships. If you need the previous behavior where ``null`` values
33+
fail validation, you can explicitly set ``allowNullableNulls`` to ``false`` in your validation rules.
3034

3135
View
3236
----

0 commit comments

Comments
 (0)