jQuery.validator.addMethod("stateprovince",function(b,a){return this.optional(a)||/^[A-Za-z\.]{2,}$/.test(b)},"Enter a valid state/province.");jQuery.validator.addMethod("city",function(b,a){return this.optional(a)||/^[\w\s\-\.\']+$/.test(b)},"Enter a valid city.");jQuery.validator.addMethod("postalcode",function(b,a){return this.optional(a)||/^[0-9a-zA-Z\-]{4,10}$/.test(b)},"Please enter a valid postal code.");jQuery.validator.addMethod("areacode",function(b,a){return this.optional(a)||/^[\d]{2,3}$/.test(b)},"Invalid area code.");jQuery.validator.addMethod("address",function(b,a){return this.optional(a)||/^[\w\s\.\-#\']+$/.test(b)},"Please enter a valid address.");jQuery.validator.addMethod("personname",function(b,a){return this.optional(a)||/^[\w\s\-\.\']+$/.test(b)},"Invalid character.");jQuery.validator.addMethod("localphone",function(b,a){return this.optional(a)||/^[\d]{3}([\.\-|\s]?)[\d]{4,6}$/.test(b)},"Enter a valid phone number.");jQuery.validator.addMethod("creditcardlength",function(b,a){return this.optional(a)||/^[\d]{13,16}$/.test(b)},"Card number must be 13-16 digits.");jQuery.validator.addMethod("creditCardExpirationMonth",function(g,f){if($(f).next().val()==""){return true}var c=new Date();var b=new Date(c.getFullYear(),c.getMonth(),c.getDate());var e=g-1;var d=$(f).next().val();var a=new Date(d,e,c.getDate());return b<=a},"Please enter a valid expiration date.");jQuery.validator.addMethod("creditCardExpirationYear",function(g,f){if($(f).prev().val()==""){return true}var c=new Date();var b=new Date(c.getFullYear(),c.getMonth(),1);var d=g;var e=$(f).prev().val()-1;var a=new Date(d,e,1);return b<=a},"Please enter a valid expiration date.");