Maybe something like this?
$v = Validator::make($data, array( 'A' => 'required|numeric', ));
$v->sometimes('B', 'required|numeric', function($input) { if ($input->A == 1) { return $input->B == 2; }
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community