📜  laravel 对多列的唯一验证 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.895000             🧑  作者: Mango

代码示例4
// in my case, just add more unique rule
'phone1' =>'string|unique:tbl_users,phone1|unique:tbl_users,phone2|different:phone2|min:2',
'phone2' =>'string|unique:tbl_users,phone2|unique:tbl_users,phone1|different:phone1|min:2',