distance validation