Conditional Action/validation to restrict shipping to a P.O Box address
I am not sure if this is the right forum to ask this. I am looking for a way to restrict customers from putting a P.O box address in the shipping information, on address field. Is there a way of doing this?
Comments
not sure if there is a module
not sure if there is a module for that. I can think of a few ways to handle this.
With Javascript: add some javascript that checks the address field
Use hook_form_validate(), you can check the submitted field's value after they have submitted the form.
Thanks for replying, i ended
Thanks for replying, i ended up using hook _form_commerce_checkout_form_checkout_alter() && _commerce_checkout_form_validate() and it works fine.