Celestine API Documentation - v0.2.1
    Preparing search index...

    Function validateLocation

    • Validate a geographic location

      Checks if latitude and longitude are within valid ranges and returns detailed error messages if invalid.

      Note: This does NOT normalize the values - it checks them as-is. Use normalizeLatitude/normalizeLongitude first if needed.

      Parameters

      Returns LocationValidationResult

      Validation result with error messages

      validateLocation({ latitude: 51.5, longitude: -0.1 })
      // { valid: true, errors: [] }

      validateLocation({ latitude: 95, longitude: -0.1 })
      // { valid: false, errors: ['Latitude must be between -90 and +90, got 95'] }