You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm doing something wrong but the error messages for the each rule are very unclear when using getMessages(). getFullMessage() has a much better result but seeing as I need to return any errors in JSON format it doesn't fit my needs.
Array
(
[allOf] => Array
(
[validator.0] => All of the required rules must pass for `{ "product_title": "test", "quantity": "test" }`
[validator.1] => All of the required rules must pass for `{ "product_title2": "test" }`
)
)
The desired result would look something like this
Array
(
[order_items] => Array
(
[item_1] => Array
(
[product_title] => product_title must be present
)
)
)
The text was updated successfully, but these errors were encountered:
Maybe I'm doing something wrong but the error messages for the
each
rule are very unclear when usinggetMessages()
.getFullMessage()
has a much better result but seeing as I need to return any errors in JSON format it doesn't fit my needs.My code:
Resulting error messages:
The desired result would look something like this
The text was updated successfully, but these errors were encountered: