title: JavaScript Google Map Coordinate Validation
body: <p>I have a form where you can select a point on the map, and it populates lat and lon textboxes, or you can enter the coordinates yourself.  </p>
  
  <p>I need to add validation to make sure the user enters valid ranges, but I am not sure if I have the right RegEx.  Here is the method I am using:</p>
  
  <pre><code>var regex_coords = "[-]?[0-9]*[.]{0,1}[0-9]";
  
  // ...
  
  valid_coords: function (number) {
  if (number.match(regex_coords) &amp;&amp; !isNaN(Number(number))) {
      $("#btnSaveResort").removeAttr("disabled");
      return true;
  } else {
      $("#btnSaveResort").attr("disabled", "disabled");
      return false;
  }
  },
  </code></pre>
  
  <p>This function returns false no matter what I have entered in the textboxes.</p>
  
  <p>Any suggestions on a better way?</p>