NASA-IMPACT / admg-backend

Apache License 2.0
2 stars 0 forks source link

Spatial bounds format helper text and validation check #620

Open heidimok opened 3 months ago

heidimok commented 3 months ago

Context

A bug was previously reported https://github.com/NASA-IMPACT/admg-backend/issues/617 and we found that it was related to the spatial bounds input not matching the accepted criteria. The MI should provide more information on what is the correct criteria and also provide error messaging instead of a 505 error.

Acceptance Criteria

Help curators understand what the constraints are by adding helper text under the spatial bounds input to say min Longitude, min Latitude, max Longitude, max Latitude

image

Guard more closely against spatial bound inputs that can't be parsed. Check if we are offering error messaging upon validating and saving. If not, we should check that the first Longitude is smaller than the second, and the same for the Latitude and throw a red error text.

image