Level 14
'nric_no' => 'required|array|min:1',
'nric_no.*' => 'required|digits:12',
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello i would like some pointers on validate my use case here.
"nric_no" => array:3 [▼ 1 => "123456789011" 2 => "9231" 3 => null ]
How can i validate only 1 item is required out of the default 3 but the item is the array must be size of 12 characters.
$request->validate([
'name'=>'required|array|min:1',
'email'=>'required|array|min:1',
'nric_no'=>'required|array',
'nric_no.*' => 'nullable',
'nric_no.1' => 'required',
'designation'=>'required|array|min:1',
'phone_no'=>'required',
'sku'=>'required',
],
Please or to participate in this conversation.