Fixed it! :)
public function rules() {
$rules = [];
foreach($this->input('candidates') as $key => $value) {
$rules["candidates.{$key}.candidate_number"] = ['required', 'numeric'];
$rules["candidates.{$key}. givennames"] = ['required'];
}
return $rules;
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community