Validate the response while saving a new address

This commit is contained in:
Paul Driver 2010-08-30 12:58:56 -05:00
parent 3f0a229f17
commit afe701ae59

View file

@ -300,6 +300,11 @@
var id = o.responseText,
d = self.elements.dropdowns;
if (!id.match(/^[A-Za-z0-9_-]{22}$/)) {
alert('Error: bad response trying to save address.');
return;
}
function updateOne(dropdown) {
var opt = _.detect(dropdown.options, function (o) {
return o.text === label;