!function(t,i,e,r){"use strict";function n(i,e){this.element=i,this.$el=t(this.element),this.settings=t.extend({},o,e),this._defaults=o,this._name=a,this.init()}var a="forminatorFrontValidate",o={rules:{},messages:{}};t.extend(n.prototype,{init:function(){var i=this;t(this.element).validate({ignore:":hidden:not(.forminator-wp-editor-required, .forminator-input-file-required)",errorPlacement:function(t,i){},onfocusout:function(i){!1===t(i).hasClass("hasDatepicker")&&t(i).valid()},highlight:function(i,e,r){var n=this.errorMap[i.name],a=t(i).closest(".forminator-field--inner");0===a.length&&(a=t(i).closest(".forminator-field"));var o=a.find(".forminator-label--validation");0===o.length&&(a.append('<label class="forminator-label--validation"></label>'),o=a.find(".forminator-label--validation")),t(i).attr("aria-invalid","true"),o.text(n),a.addClass("forminator-has_error")},unhighlight:function(i,e,r){var n=t(i).closest(".forminator-field--inner");0===n.length&&(n=t(i).closest(".forminator-field"));var a=n.find(".forminator-label--validation");t(i).removeAttr("aria-invalid"),a.remove(),n.removeClass("forminator-has_error")},rules:i.settings.rules,messages:i.settings.messages})}}),t.fn[a]=function(i){return this.each(function(){t.data(this,a)||t.data(this,a,new n(this,i))})},t.validator.addMethod("datedmy",function(t,i){return this.optional(i)||t.match(/^\d\d?\/\d\d?\/\d\d\d\d$/)}),t.validator.addMethod("maxwords",function(t,i,e){return this.optional(i)||jQuery.trim(t).split(/\s+/).length<=e}),t.validator.addMethod("emailWP",function(t,i,e){if(this.optional(i))return!0;if(t.length<6)return!1;if(t.indexOf("@",1)<0)return!1;var r=t.split("@",2);if(!r[0].match(/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~\.-]+$/))return!1;if(r[1].match(/\.{2,}/))return!1;var n=r[1],a=n.split(".");if(a.length<2)return!1;for(var o=a.length,s=0;s<o;s++)if(!a[s].match(/^[a-z0-9-]+$/i))return!1;return!0})}(jQuery,window,document);