Laravel existiert Validierung
'state_id' => 'exists:states,id'
Lokesh003
'state_id' => 'exists:states,id'
"sale_price" => "required_if:list_type,==,selling"
$request->validate([
'daily_movement_id'=>'required_with:daily_movement',
'daily_movement'=>'required_with:daily_movement_id',
]);
//////////////////////////////////////////////////////
$request->validate([
'daily_movement_id'=>'required_without:daily_movement',
'daily_movement'=>'required_without:daily_movement_id',
]);
public function rules()
{
return [
'reclamo_procede' => 'max:1',
'solucion_minutos' => 'required_if:reclamo_procede,==,si',
];
}
unique:table,column,except,idColumn
############## Example : ################
############### For Updating
//rules
'email' => 'unique:users,email_address,' . $userId,
############### For Creating
//rules
'email' => 'unique:users,email_address',