GodziLaravel
7 months ago
585
1
Laravel

How to add condition "where not equal" in validation ?

Posted 7 months ago by GodziLaravel

I want to add one condition to 'segments.*.builder' => 'required', where segments.*.builder should not equal to "abc" ?

        $request->validate([
            'name' => 'required',
            'segments.*.builder' => 'required',
            'segments.*.value' => 'required',
        ]);

Thanks

Please sign in or create an account to participate in this conversation.