Support the ongoing development of Laravel.io →
Requests Laravel

Hello Guys , does any one there knows how can I validate an form array with form Request ?

I want to make something like that -

 public function rules()
    {
        return [
            'user[id]'               => 'required' ,
            'user[status]'   => 'required' 
        ];
    }

I tried like this as well -

public function rules()
    {
        return [
            'user.id'               => 'required' ,
            'user.status'       => 'required' 
        ];
    }

Last updated 2 years ago.
0

Did you try this: Validating Arrays in Laravel?

Last updated 6 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.