Skip to content

Conversation

@WesleyKoech
Copy link

Fix out-of-range lat/lon error when user sets values outside of (-180, 180) and (-90, 90) respectively. The error is as shown:
Screenshot from 2023-02-08 12-53-35

@tananaev
Copy link
Member

tananaev commented Feb 8, 2023

I think the right solution is to implement validation at the time you enter those values.

@WesleyKoech
Copy link
Author

It makes sense to add validations to both the endpoint for creating a user on the server-side and the user-add form in the web app.

@tananaev
Copy link
Member

tananaev commented Feb 8, 2023

Agree. Do you want to update this PR or create a separate one?

@WesleyKoech
Copy link
Author

Cool. I will update the current PR.

type="number"
value={item.latitude || 0}
onChange={(event) => setItem({ ...item, latitude: Number(event.target.value) })}
onChange={(event) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the same code on the server setting page.

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.

2 participants