0 votes

Validate string format "Latitude, Longitude"

I have a user control of type entry, and I would like the user to only be able to enter the following format:

Latitude, Longitude such as "12.2323, -1.53452"

In other words, you can only enter numbers, periods, 1 comma, and the minus sign. On the other hand I have read that the latitude must be a number between -90 and 90 and the longitude between -180 and 180

How can I do this? What functions can I use to perform the validation? Thanks

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X