Fixed the bug in validation logic.

The longitude condition was never true because of the flase check.