unique check with multiple columns laravel validation
'name' => 'unique:table,field,NULL,id,field1,value1,field2,value2,field3,value3'
unique check with multiple columns laravel validation
'name' => 'unique:table,field,NULL,id,field1,value1,field2,value2,field3,value3'
laravel unique validation on multiple columns
'mobile_no'
=> 'unique:users,mobile_no,NULL,id,country_id,'.request('country_id');
unique check two clolumn in laravel validation
'data.ip' => ['required', 'unique:servers,ip,'.$this->id.',NULL,id,hostname,'.$request->input('hostname')]
laravel 8 validation unique 2 columns
// 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',
unique check two clolumn in laravel validation
'data.ip' => ['required', 'unique:servers,ip,'.$this->id.','.$request->input('id').',id,hostname,'.$request->input('hostname')]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us