diff --git a/form-validator/location.dev.js b/form-validator/location.dev.js index 80e7060..065b75c 100644 --- a/form-validator/location.dev.js +++ b/form-validator/location.dev.js @@ -44,7 +44,7 @@ $.formUtils.addValidator({ name : 'longlat', validatorFunction : function(str) { - var regexp = /^[+-]?\d+\.\d+, ?[+-]?\d+\.\d+$/; + var regexp = /^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/; return regexp.test(str); }, errorMessage:'', @@ -75,4 +75,4 @@ return $.formUtils.suggest(this, states, settings); }; -})(jQuery); \ No newline at end of file +})(jQuery);