Level 1
Currently I solve it by an extra check before validation. But I still wonder to know the reason .
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I have a table with a unique index on three columns of it. and this is my validation code :
'title' => [
'string',
'present',
Rule::unique('product_combinations', 'title')
->where('product_id', $request->input('product_id', 0))
->where('tab_id', $request->input('tab_id', 0))
->ignore($model->id),
],
the rule only works when the title input is not empty. so what I can do ?
Please or to participate in this conversation.