Support the ongoing development of Laravel.io →
Forms Validation
Last updated 2 years ago.
0

If I understand the question correctly, required_with and required_without, looks like a good bet.

Last updated 2 years ago.
0

as @tkprocat said required_with and required_without should work:

$input = Input::all();
$rules = array(
    'field_a' => '',
    'field_b' => 'required_without:field_a',
    'field_c' => 'required_with:field_d',
    'field_d' => ''
);
$validator = Validator::make($input,$rules);
Last updated 2 years ago.
0

Exactly what I needed. Thank you.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jerauf jerauf Joined 16 Feb 2014

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.

© 2024 Laravel.io - All rights reserved.