2023-12-31 09:24:05 -05:00
|
|
|
---
|
|
|
|
title: Input Validation
|
|
|
|
---
|
2022-07-11 11:09:18 -04:00
|
|
|
|
2023-01-04 03:17:33 -05:00
|
|
|
**`LATITUDE`**
|
2022-07-11 11:09:18 -04:00
|
|
|
Accepted formats are:
|
|
|
|
|
|
|
|
- Float (eg. `24.2028`)
|
2023-01-04 03:17:33 -05:00
|
|
|
- Negative Float (eg. `-24.2028`)
|
2022-07-11 11:09:18 -04:00
|
|
|
|
2023-01-04 03:17:33 -05:00
|
|
|
Regex used to match this: `^(\+|-)?(?:90(?:(?:\.0{1,15})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,15})?))$`
|
|
|
|
You can try live [here](https://regex101.com/r/kzRvvw/1)
|
|
|
|
|
|
|
|
**`LONGITUDE`**
|
|
|
|
Accepted formats are:
|
|
|
|
|
|
|
|
- Float (eg. `24.2028`)
|
|
|
|
- Negative Float (eg. `-24.2028`)
|
|
|
|
|
|
|
|
Regex used to match this: `^(\+|-)?(?:180(?:(?:\.0{1,15})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,15})?))$`
|
|
|
|
You can try live [here](https://regex101.com/r/EjuPpL/1)
|
2022-07-11 11:09:18 -04:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
_If you find a field that you think it needs validation, please open an issue on github_
|