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("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("countrycode",function(b,a){return this.optional(a)||/^[\d]{1,4}$/.test(b)},"Country Code!");jQuery.validator.addMethod("areacode",function(b,a){return this.optional(a)||/^[\d]{1,6}$/.test(b)},"Area Code!");jQuery.validator.addMethod("localphone",function(b,a){return this.optional(a)||/^[\.\-|\s\d]{2,16}$/.test(b)},"Local Phone!");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.");
