$(document).ready(function() { $.validator.addMethod("posty",function(value,element) { return this.optional(element) || /^(((2|8|9)\d{2})|((02|08|09)\d{2})|([1-9]\d{3}))$/i.test(value); },"Invalid postcode"); // Validate signup form $("#formCart").validate({ rules: { shipping_state: "required", state: "required", phone: "required", shipping_phone: "required", postcode: "posty", shipping_postcode: "posty" } }); });

Checkout

There are no items in your shopping cart.