Should your return flight be before your visa expires, you are safe. Your friend most likely confused the 6-month passport validity requirement. Some countries (depends on particular country) will not let you enter their territory if your passport expires in less than 6 months.