Have to love yourself first

Is the saying 'you have to love yourself before you can love someone else' true? And why?