<?php

$rows = [
	0 => [
		'device_id' => 3
		'price' => 321312
		],
	1 => [
		'device_id' => 1,
		'price' => 1123
		]
	];

Validator::make($rows->toArray(), [
    '*.device_id' => ['required', 'integer', 'exists:App\Device,id', Rule::unique('prices')
        ->where('device_id', $rows['device_id'])
    ],
    '*.price' => ['required', 'numeric', 'min:0', 'max:16777215'],
])
->validate();