Hi guys,
I'm trying to do a validates_format_of
on the latlng object that is passed back from Google Maps API. I've got the map set up perfectly so that when I click on a point in the map it fills in a text-field with the latlng (which looks like this: 46.320615137905904, 9.400520324707031). I'm storing this value as a string in the db (which I then parse out to place markers on the map later) but I need to validate the format of the sting as two floats (positive or negative) with a comma in between.
I know that this is possible with regex but for the life of my haven't been able to figure out the regex string to get it working.
Any help would be super appreciated! Thanks! Jeff