^-?([0-8]?[0-9]|90)(\.[0-9]{1,10})$
- 56.3847
- -56.387
- 3
- 30
- 300
- 91.34456
- 40.238946234652374238746
^-?([0-9]{1,2}|1[0-7][0-9]|180)(\.[0-9]{1,10})$
- 56.3847
- -56.387
- 91.34456
- 127.485784
- -130.37567
- 3
- 30
- 300
- 40.238946234652374238746
- 181.394898
^-?([0-8]?[0-9]|90)(\.[0-9]{1,10})?$
- 3
- 30
- 56.3847
- -56.387
- 300
- 91.34456
- 40.238946234652374238746
^-?([0-9]{1,2}|1[0-7][0-9]|180)(\.[0-9]{1,10})?$
- 3
- 30
- 56.3847
- -56.387
- 91.34456
- 127.485784
- -130.37567
- 300
- 40.238946234652374238746
- 181.394898
Note: This RegEx matches to coordinates upto 10 decimal places accurate. To increase or decrease the accuracy change the 10
to your desired accuracy in the last {1,10}
.
@anda98 this could be dependent on how your form is validating the regex. You should check the form docs