traccar / traccar-web

Traccar GPS Tracking System
https://www.traccar.org
Apache License 2.0
793 stars 1.1k forks source link

Fix invalid lat/lon usePreference #1080

Open WesleyKoech opened 1 year ago

WesleyKoech commented 1 year ago

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 commented 1 year ago

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

WesleyKoech commented 1 year ago

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 commented 1 year ago

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

WesleyKoech commented 1 year ago

Cool. I will update the current PR.