validate distances