Skip to content

v12.59.0

@sadique-cws sadique-cws tagged this 24 Mar 14:09
* [12.x] Fix TypeError when wildcard custom message is array without matching rule

When a custom validation message is defined for a wildcard attribute key
(e.g. students.*.grade) using a nested array of rule-specific messages,
and the failing rule is not in that array, getFromLocalArray returned
the entire array instead of null.

This caused a TypeError in replaceInputPlaceholder (introduced in
v12.55.1) which calls str_contains() on the message, expecting a
string.

The fix makes the wildcard branch consistent with the exact-match
branch which already returns $message[$lowerRule] ?? null.

Fixes #59316

* Add test for wildcard custom message on unmatched array rules
Assets 2
Loading