How can I use a regular expression to validate the latitude and longitude for these text fields and display an error message?
I used two different regexes for each value.
Latiude Regex:
const latRegex = /^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,15}/g;
Longitude Regex:
const lngRegex = /^-?(([-+]?)([\d]{1,3})((\.)(\d+))?)/g;