fengdie 6年前 public function rules(){ return [ 'detail.*.number' => 'required|numeric', // 想要当sncode不为空,判断number为1 'detail.*.sncode' => 'nullable|exists:inventory_batchs,sncode' ]; }