$rules = [
'a_field' => 'required_without_all:b_field,c_field',
'b_field' => 'required_without_all:a_field,c_field',
'c_field' => 'required_without_all:a_field,b_field',
];
$message = [
'a_field' => 'The a is required when none of other fields are present.',
'b_field' => 'The b is required when none of other fields are present.',
'c_field' => 'The c is required when none of other fields are present.',
];
для слишком большого количества входов
$fields = collect(['a', 'b', 'c', 'd', 'e']);
$rules = $fields->mapWithKeys(function ($field) use ($fields) {
return [
$field => 'required_without_all:' . $fields->reject(function ($item) use ($field) {
return $item == $field;
})->implode(',')
];
})->toArray();