(function(e,t){function n(e,t){var n=t.rule||"^.*$",r=new RegExp(n),i=e.length?e.val():"";return r.test(i)?!0:(alert(t.message),!1)}function r(t,r){var i=!0;return t.find("input,select").each(function(){var t=e(this),s=t.attr("name"),o=r[s];if(!o)return!0;if(!n(t,o))return i=!1,!1}),i}e(function(){e("form").each(function(){var t=e(this),i=t.attr("name"),s=_upfront_form_data[i];if(!i||!s)return!0;t.on("change","select,input",function(){var t=e(this),r=t.attr("name"),i=s[r];return i?n(t,i):!0}).on("submit",function(){return r(t,s)})})})})(jQuery);