Reputation: 175
I'm starting to wonder if this is possible at all, but I'm using Laravel and I need to check to see if the $errors object contains any keys containing a search string.
I know it contains the keys 'monitors.0.size' and 'monitors.1.size' but I need to be able to check using just 'monitors'.
$errors->has('monitors') returns false and the attempts I've made at inserting different wildcards have resulted in page errors.
Am I missing something simple? Is there a way to do this?
Upvotes: 1
Views: 462
Reputation: 705
as $errors
is an instance of \Illuminate\Support\MessageBag
I think the only way would be to loop over the $errors and compare them.
Upvotes: 2