I have the ordinary unique validation
'bank_program_id' => [
'required',
'integer',
'exists:bank_programs,id',
Rule::unique('bank_program_country', 'bank_program_id')
->where('country', $this->input('country')),
],
The business logic says there can be one unique combination bank_program_id
+ country
This validation works well inside form request but I wanna test the validation request and use such code:
$validator = Validator::make($data, $request->rules());
and the validation rule does not prevent duplicates.
Please suggest how to adapt this code, thx in advance