Skip to content

Instantly share code, notes, and snippets.

@Zifius
Created April 17, 2014 10:03
Show Gist options
  • Save Zifius/10970496 to your computer and use it in GitHub Desktop.
Save Zifius/10970496 to your computer and use it in GitHub Desktop.
PO Box check for Magento checkout
Validation.add('no-po-box', 'The shipping address must be a physical address. PO Boxes are allowed for billing only.', function(v) {
return /^box.*|^po.*box.*|^p\.o\..*box.*/i.test(v) === false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment