I have walk through much to find valid regex in javascript to validate latitude and longitude separatly.
but in vain..
tried the following but not working..
var latlngVal = /^-?([0-8]?[0-9]|90)\.[0-9]{1,6},-?((1?[0-7]?|[0-9]?)[0-9]|180)\.[0-9]{1,6}$/;
if (!latlngVal.test(this.value)) {
//logic
}
can anybody tell me the easiest way to validate the latitude and longitude entered in the textbox.
Or is there any mvc annotation to validate latitude and longitude?