PathLengthValidator() 

This method checks the length of the path.
It handles the case when the user tries to select start and end point
connected with each other.