Skip to content

feat(storage): implement geo field validation in BaseStorage.validateField#22

Open
HirenGajjar wants to merge 1 commit into
redis-developer:mainfrom
HirenGajjar:feat/geo-field-validation
Open

feat(storage): implement geo field validation in BaseStorage.validateField#22
HirenGajjar wants to merge 1 commit into
redis-developer:mainfrom
HirenGajjar:feat/geo-field-validation

Conversation

@HirenGajjar
Copy link
Copy Markdown

Closes #11

What

Implements geo field validation in BaseStorage.validateField, which previously had a TODO and silently accepted malformed values when validateOnLoad: true was set.

Why

Malformed geo strings like "foo,bar" were passing validation and getting rejected by Redis at index time, making debugging harder for users.

Changes

  • Validates geo values are strings in longitude,latitude format
  • Rejects longitudes outside [-180, 180] and latitudes outside [-90, 90]
  • Rejects non-numeric coordinates with a clear error message
  • Adds unit tests in tests/unit/storage/ covering all valid and invalid cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement geo field validation in BaseStorage.validateField

1 participant