Commit 45681c86 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

jquery validation plugin 1.11.1.

parent 1f9e9e20
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts63959068.92</string> </value> <value> <string>ts63969427.42</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -26,9 +26,16 @@ ...@@ -26,9 +26,16 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*! jQuery Validation Plugin - v1.11.0 - 2/4/2013\n /*!\n
* https://github.com/jzaefferer/jquery-validation\n * jQuery Validation Plugin 1.11.1\n
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */\n *\n
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n
* http://docs.jquery.com/Plugins/Validation\n
*\n
* Copyright 2013 Jörn Zaefferer\n
* Released under the MIT license:\n
* http://www.opensource.org/licenses/mit-license.php\n
*/\n
\n \n
(function($) {\n (function($) {\n
\n \n
...@@ -66,6 +73,11 @@ $.extend($.fn, {\n ...@@ -66,6 +73,11 @@ $.extend($.fn, {\n
\t\t\t\tif ( $(event.target).hasClass("cancel") ) {\n \t\t\t\tif ( $(event.target).hasClass("cancel") ) {\n
\t\t\t\t\tvalidator.cancelSubmit = true;\n \t\t\t\t\tvalidator.cancelSubmit = true;\n
\t\t\t\t}\n \t\t\t\t}\n
\n
\t\t\t\t// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n
\t\t\t\tif ( $(event.target).attr("formnovalidate") !== undefined ) {\n
\t\t\t\t\tvalidator.cancelSubmit = true;\n
\t\t\t\t}\n
\t\t\t});\n \t\t\t});\n
\n \n
\t\t\t// validate the form on submit\n \t\t\t// validate the form on submit\n
...@@ -79,7 +91,7 @@ $.extend($.fn, {\n ...@@ -79,7 +91,7 @@ $.extend($.fn, {\n
\t\t\t\t\tif ( validator.settings.submitHandler ) {\n \t\t\t\t\tif ( validator.settings.submitHandler ) {\n
\t\t\t\t\t\tif ( validator.submitButton ) {\n \t\t\t\t\t\tif ( validator.submitButton ) {\n
\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n \t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n
\t\t\t\t\t\t\thidden = $("<input type=\'hidden\'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);\n \t\t\t\t\t\t\thidden = $("<input type=\'hidden\'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);\n
\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n
\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm, event );\n \t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm, event );\n
\t\t\t\t\t\tif ( validator.submitButton ) {\n \t\t\t\t\t\tif ( validator.submitButton ) {\n
...@@ -119,7 +131,7 @@ $.extend($.fn, {\n ...@@ -119,7 +131,7 @@ $.extend($.fn, {\n
\t\t\tvar valid = true;\n \t\t\tvar valid = true;\n
\t\t\tvar validator = $(this[0].form).validate();\n \t\t\tvar validator = $(this[0].form).validate();\n
\t\t\tthis.each(function() {\n \t\t\tthis.each(function() {\n
\t\t\t\tvalid &= validator.element(this);\n \t\t\t\tvalid = valid && validator.element(this);\n
\t\t\t});\n \t\t\t});\n
\t\t\treturn valid;\n \t\t\treturn valid;\n
\t\t}\n \t\t}\n
...@@ -145,6 +157,8 @@ $.extend($.fn, {\n ...@@ -145,6 +157,8 @@ $.extend($.fn, {\n
\t\t\tswitch(command) {\n \t\t\tswitch(command) {\n
\t\t\tcase "add":\n \t\t\tcase "add":\n
\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n \t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n
\t\t\t\t// remove messages from rules, but allow them to be set separetely\n
\t\t\t\tdelete existingRules.messages;\n
\t\t\t\tstaticRules[element.name] = existingRules;\n \t\t\t\tstaticRules[element.name] = existingRules;\n
\t\t\t\tif ( argument.messages ) {\n \t\t\t\tif ( argument.messages ) {\n
\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n \t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n
...@@ -187,11 +201,11 @@ $.extend($.fn, {\n ...@@ -187,11 +201,11 @@ $.extend($.fn, {\n
// Custom selectors\n // Custom selectors\n
$.extend($.expr[":"], {\n $.extend($.expr[":"], {\n
\t// http://docs.jquery.com/Plugins/Validation/blank\n \t// http://docs.jquery.com/Plugins/Validation/blank\n
\tblank: function( a ) { return !$.trim("" + a.value); },\n \tblank: function( a ) { return !$.trim("" + $(a).val()); },\n
\t// http://docs.jquery.com/Plugins/Validation/filled\n \t// http://docs.jquery.com/Plugins/Validation/filled\n
\tfilled: function( a ) { return !!$.trim("" + a.value); },\n \tfilled: function( a ) { return !!$.trim("" + $(a).val()); },\n
\t// http://docs.jquery.com/Plugins/Validation/unchecked\n \t// http://docs.jquery.com/Plugins/Validation/unchecked\n
\tunchecked: function( a ) { return !a.checked; }\n \tunchecked: function( a ) { return !$(a).prop("checked"); }\n
});\n });\n
\n \n
// constructor for validator\n // constructor for validator\n
...@@ -581,7 +595,7 @@ $.extend($.validator, {\n ...@@ -581,7 +595,7 @@ $.extend($.validator, {\n
\t\t\t\t\t}\n \t\t\t\t\t}\n
\t\t\t\t} catch(e) {\n \t\t\t\t} catch(e) {\n
\t\t\t\t\tif ( this.settings.debug && window.console ) {\n \t\t\t\t\tif ( this.settings.debug && window.console ) {\n
\t\t\t\t\t\tconsole.log( "Exception occured when checking element " + element.id + ", check the \'" + rule.method + "\' method.", e );\n \t\t\t\t\t\tconsole.log( "Exception occurred when checking element " + element.id + ", check the \'" + rule.method + "\' method.", e );\n
\t\t\t\t\t}\n \t\t\t\t\t}\n
\t\t\t\t\tthrow e;\n \t\t\t\t\tthrow e;\n
\t\t\t\t}\n \t\t\t\t}\n
...@@ -854,6 +868,7 @@ $.extend($.validator, {\n ...@@ -854,6 +868,7 @@ $.extend($.validator, {\n
\tattributeRules: function( element ) {\n \tattributeRules: function( element ) {\n
\t\tvar rules = {};\n \t\tvar rules = {};\n
\t\tvar $element = $(element);\n \t\tvar $element = $(element);\n
\t\tvar type = $element[0].getAttribute("type");\n
\n \n
\t\tfor (var method in $.validator.methods) {\n \t\tfor (var method in $.validator.methods) {\n
\t\t\tvar value;\n \t\t\tvar value;\n
...@@ -872,9 +887,17 @@ $.extend($.validator, {\n ...@@ -872,9 +887,17 @@ $.extend($.validator, {\n
\t\t\t\tvalue = $element.attr(method);\n \t\t\t\tvalue = $element.attr(method);\n
\t\t\t}\n \t\t\t}\n
\n \n
\t\t\t// convert the value to a number for number inputs, and for text for backwards compability\n
\t\t\t// allows type="date" and others to be compared as strings\n
\t\t\tif ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n
\t\t\t\tvalue = Number(value);\n
\t\t\t}\n
\n
\t\t\tif ( value ) {\n \t\t\tif ( value ) {\n
\t\t\t\trules[method] = value;\n \t\t\t\trules[method] = value;\n
\t\t\t} else if ( $element[0].getAttribute("type") === method ) {\n \t\t\t} else if ( type === method && type !== \'range\' ) {\n
\t\t\t\t// exception: the jquery validate \'range\' method\n
\t\t\t\t// does not test for the html5 \'range\' type\n
\t\t\t\trules[method] = true;\n \t\t\t\trules[method] = true;\n
\t\t\t}\n \t\t\t}\n
\t\t}\n \t\t}\n
...@@ -945,7 +968,7 @@ $.extend($.validator, {\n ...@@ -945,7 +968,7 @@ $.extend($.validator, {\n
\t\t\t\trules[this] = Number(rules[this]);\n \t\t\t\trules[this] = Number(rules[this]);\n
\t\t\t}\n \t\t\t}\n
\t\t});\n \t\t});\n
\t\t$.each([\'rangelength\'], function() {\n \t\t$.each([\'rangelength\', \'range\'], function() {\n
\t\t\tvar parts;\n \t\t\tvar parts;\n
\t\t\tif ( rules[this] ) {\n \t\t\tif ( rules[this] ) {\n
\t\t\t\tif ( $.isArray(rules[this]) ) {\n \t\t\t\tif ( $.isArray(rules[this]) ) {\n
...@@ -1014,93 +1037,6 @@ $.extend($.validator, {\n ...@@ -1014,93 +1037,6 @@ $.extend($.validator, {\n
\t\t\treturn $.trim(value).length > 0;\n \t\t\treturn $.trim(value).length > 0;\n
\t\t},\n \t\t},\n
\n \n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\n
\t\tremote: function( value, element, param ) {\n
\t\t\tif ( this.optional(element) ) {\n
\t\t\t\treturn "dependency-mismatch";\n
\t\t\t}\n
\n
\t\t\tvar previous = this.previousValue(element);\n
\t\t\tif (!this.settings.messages[element.name] ) {\n
\t\t\t\tthis.settings.messages[element.name] = {};\n
\t\t\t}\n
\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\n
\t\t\tthis.settings.messages[element.name].remote = previous.message;\n
\n
\t\t\tparam = typeof param === "string" && {url:param} || param;\n
\n
\t\t\tif ( previous.old === value ) {\n
\t\t\t\treturn previous.valid;\n
\t\t\t}\n
\n
\t\t\tprevious.old = value;\n
\t\t\tvar validator = this;\n
\t\t\tthis.startRequest(element);\n
\t\t\tvar data = {};\n
\t\t\tdata[element.name] = value;\n
\t\t\t$.ajax($.extend(true, {\n
\t\t\t\turl: param,\n
\t\t\t\tmode: "abort",\n
\t\t\t\tport: "validate" + element.name,\n
\t\t\t\tdataType: "json",\n
\t\t\t\tdata: data,\n
\t\t\t\tsuccess: function( response ) {\n
\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\n
\t\t\t\t\tvar valid = response === true || response === "true";\n
\t\t\t\t\tif ( valid ) {\n
\t\t\t\t\t\tvar submitted = validator.formSubmitted;\n
\t\t\t\t\t\tvalidator.prepareElement(element);\n
\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n
\t\t\t\t\t\tvalidator.successList.push(element);\n
\t\t\t\t\t\tdelete validator.invalid[element.name];\n
\t\t\t\t\t\tvalidator.showErrors();\n
\t\t\t\t\t} else {\n
\t\t\t\t\t\tvar errors = {};\n
\t\t\t\t\t\tvar message = response || validator.defaultMessage( element, "remote" );\n
\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n
\t\t\t\t\t\tvalidator.invalid[element.name] = true;\n
\t\t\t\t\t\tvalidator.showErrors(errors);\n
\t\t\t\t\t}\n
\t\t\t\t\tprevious.valid = valid;\n
\t\t\t\t\tvalidator.stopRequest(element, valid);\n
\t\t\t\t}\n
\t\t\t}, param));\n
\t\t\treturn "pending";\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\n
\t\tminlength: function( value, element, param ) {\n
\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n
\t\t\treturn this.optional(element) || length >= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n
\t\tmaxlength: function( value, element, param ) {\n
\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n
\t\t\treturn this.optional(element) || length <= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n
\t\trangelength: function( value, element, param ) {\n
\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n
\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\n
\t\tmin: function( value, element, param ) {\n
\t\t\treturn this.optional(element) || value >= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\n
\t\tmax: function( value, element, param ) {\n
\t\t\treturn this.optional(element) || value <= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\n
\t\trange: function( value, element, param ) {\n
\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\n \t\t// http://docs.jquery.com/Plugins/Validation/Methods/email\n
\t\temail: function( value, element ) {\n \t\temail: function( value, element ) {\n
\t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n \t\t\t// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/\n
...@@ -1164,6 +1100,39 @@ $.extend($.validator, {\n ...@@ -1164,6 +1100,39 @@ $.extend($.validator, {\n
\t\t\treturn (nCheck % 10) === 0;\n \t\t\treturn (nCheck % 10) === 0;\n
\t\t},\n \t\t},\n
\n \n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/minlength\n
\t\tminlength: function( value, element, param ) {\n
\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n
\t\t\treturn this.optional(element) || length >= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/maxlength\n
\t\tmaxlength: function( value, element, param ) {\n
\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n
\t\t\treturn this.optional(element) || length <= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/rangelength\n
\t\trangelength: function( value, element, param ) {\n
\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);\n
\t\t\treturn this.optional(element) || ( length >= param[0] && length <= param[1] );\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/min\n
\t\tmin: function( value, element, param ) {\n
\t\t\treturn this.optional(element) || value >= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/max\n
\t\tmax: function( value, element, param ) {\n
\t\t\treturn this.optional(element) || value <= param;\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/range\n
\t\trange: function( value, element, param ) {\n
\t\t\treturn this.optional(element) || ( value >= param[0] && value <= param[1] );\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n \t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n
\t\tequalTo: function( value, element, param ) {\n \t\tequalTo: function( value, element, param ) {\n
\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n \t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n
...@@ -1175,6 +1144,60 @@ $.extend($.validator, {\n ...@@ -1175,6 +1144,60 @@ $.extend($.validator, {\n
\t\t\t\t});\n \t\t\t\t});\n
\t\t\t}\n \t\t\t}\n
\t\t\treturn value === target.val();\n \t\t\treturn value === target.val();\n
\t\t},\n
\n
\t\t// http://docs.jquery.com/Plugins/Validation/Methods/remote\n
\t\tremote: function( value, element, param ) {\n
\t\t\tif ( this.optional(element) ) {\n
\t\t\t\treturn "dependency-mismatch";\n
\t\t\t}\n
\n
\t\t\tvar previous = this.previousValue(element);\n
\t\t\tif (!this.settings.messages[element.name] ) {\n
\t\t\t\tthis.settings.messages[element.name] = {};\n
\t\t\t}\n
\t\t\tprevious.originalMessage = this.settings.messages[element.name].remote;\n
\t\t\tthis.settings.messages[element.name].remote = previous.message;\n
\n
\t\t\tparam = typeof param === "string" && {url:param} || param;\n
\n
\t\t\tif ( previous.old === value ) {\n
\t\t\t\treturn previous.valid;\n
\t\t\t}\n
\n
\t\t\tprevious.old = value;\n
\t\t\tvar validator = this;\n
\t\t\tthis.startRequest(element);\n
\t\t\tvar data = {};\n
\t\t\tdata[element.name] = value;\n
\t\t\t$.ajax($.extend(true, {\n
\t\t\t\turl: param,\n
\t\t\t\tmode: "abort",\n
\t\t\t\tport: "validate" + element.name,\n
\t\t\t\tdataType: "json",\n
\t\t\t\tdata: data,\n
\t\t\t\tsuccess: function( response ) {\n
\t\t\t\t\tvalidator.settings.messages[element.name].remote = previous.originalMessage;\n
\t\t\t\t\tvar valid = response === true || response === "true";\n
\t\t\t\t\tif ( valid ) {\n
\t\t\t\t\t\tvar submitted = validator.formSubmitted;\n
\t\t\t\t\t\tvalidator.prepareElement(element);\n
\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n
\t\t\t\t\t\tvalidator.successList.push(element);\n
\t\t\t\t\t\tdelete validator.invalid[element.name];\n
\t\t\t\t\t\tvalidator.showErrors();\n
\t\t\t\t\t} else {\n
\t\t\t\t\t\tvar errors = {};\n
\t\t\t\t\t\tvar message = response || validator.defaultMessage( element, "remote" );\n
\t\t\t\t\t\terrors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;\n
\t\t\t\t\t\tvalidator.invalid[element.name] = true;\n
\t\t\t\t\t\tvalidator.showErrors(errors);\n
\t\t\t\t\t}\n
\t\t\t\t\tprevious.valid = valid;\n
\t\t\t\t\tvalidator.stopRequest(element, valid);\n
\t\t\t\t}\n
\t\t\t}, param));\n
\t\t\treturn "pending";\n
\t\t}\n \t\t}\n
\n \n
\t}\n \t}\n
...@@ -1212,7 +1235,8 @@ $.format = $.validator.format;\n ...@@ -1212,7 +1235,8 @@ $.format = $.validator.format;\n
\t\t\t\tif ( pendingRequests[port] ) {\n \t\t\t\tif ( pendingRequests[port] ) {\n
\t\t\t\t\tpendingRequests[port].abort();\n \t\t\t\t\tpendingRequests[port].abort();\n
\t\t\t\t}\n \t\t\t\t}\n
\t\t\t\treturn (pendingRequests[port] = ajax.apply(this, arguments));\n \t\t\t\tpendingRequests[port] = ajax.apply(this, arguments);\n
\t\t\t\treturn pendingRequests[port];\n
\t\t\t}\n \t\t\t}\n
\t\t\treturn ajax.apply(this, arguments);\n \t\t\treturn ajax.apply(this, arguments);\n
\t\t};\n \t\t};\n
...@@ -1243,7 +1267,7 @@ $.format = $.validator.format;\n ...@@ -1243,7 +1267,7 @@ $.format = $.validator.format;\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>38015</int> </value> <value> <int>38951</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts63959085.35</string> </value> <value> <string>ts63969440.36</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -26,10 +26,8 @@ ...@@ -26,10 +26,8 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*! jQuery Validation Plugin - v1.11.0 - 2/4/2013\n /*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\\n* https://github.com/jzaefferer/jquery-validation\n
* https://github.com/jzaefferer/jquery-validation\n * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can\'t validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("<input type=\'hidden\'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\\\{"+t+"\\\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type=\'password\'], [type=\'file\'], select, textarea, [type=\'number\'], [type=\'search\'] ,[type=\'tel\'], [type=\'url\'], [type=\'email\'], [type=\'datetime\'], [type=\'date\'], [type=\'month\'], [type=\'week\'], [type=\'time\'], [type=\'datetime-local\'], [type=\'range\'], [type=\'color\'] ","focusin focusout keyup",e).validateDelegate("[type=\'radio\'], [type=\'checkbox\'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name=\'"+t(e).attr("name")+"\']:checked").val():"string"==typeof s?s.replace(/\\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the \'"+u.method+"\' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\\$?\\{(\\d+)\\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name=\'"+e+"\']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \\-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery);
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */\n
(function(e){e.extend(e.fn,{validate:function(t){if(!this.length){t&&t.debug&&window.console&&console.warn("Nothing selected, can\'t validate, returning nothing.");return}var n=e.data(this[0],"validator");return n?n:(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){n.settings.submitHandler&&(n.submitButton=t.target),e(t.target).hasClass("cancel")&&(n.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return n.settings.submitHandler?(n.submitButton&&(r=e("<input type=\'hidden\'/>").attr("name",n.submitButton.name).val(n.submitButton.value).appendTo(n.currentForm)),n.settings.submitHandler.call(n,n.currentForm,t),n.submitButton&&r.remove(),!1):!0}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)})),n)},valid:function(){if(e(this[0]).is("form"))return this.validate().form();var t=!0,n=e(this[0].form).validate();return this.each(function(){t&=n.element(this)}),t},removeAttrs:function(t){var n={},r=this;return e.each(t.split(/\\s/),function(e,t){n[t]=r.attr(t),r.removeAttr(t)}),n},rules:function(t,n){var r=this[0];if(t){var i=e.data(r.form,"validator").settings,s=i.rules,o=e.validator.staticRules(r);switch(t){case"add":e.extend(o,e.validator.normalizeRule(n)),s[r.name]=o,n.messages&&(i.messages[r.name]=e.extend(i.messages[r.name],n.messages));break;case"remove":if(!n)return delete s[r.name],o;var u={};return e.each(n.split(/\\s/),function(e,t){u[t]=o[t],delete o[t]}),u}}var a=e.validator.normalizeRules(e.extend({},e.validator.classRules(r),e.validator.attributeRules(r),e.validator.dataRules(r),e.validator.staticRules(r)),r);if(a.required){var f=a.required;delete a.required,a=e.extend({required:f},a)}return a}}),e.extend(e.expr[":"],{blank:function(t){return!e.trim(""+t.value)},filled:function(t){return!!e.trim(""+t.value)},unchecked:function(e){return!e.checked}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return arguments.length===1?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\\\{"+e+"\\\\}","g"),function(){return n})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e,t){this.lastActive=e,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(e)).hide())},onfocusout:function(e,t){!this.checkable(e)&&(e.name in this.submitted||!this.optional(e))&&this.element(e)},onkeyup:function(e,t){if(t.which===9&&this.elementValue(e)==="")return;(e.name in this.submitted||e===this.lastElement)&&this.element(e)},onclick:function(e,t){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,r){t.type==="radio"?this.findByName(t.name).addClass(n).removeClass(r):e(t).addClass(n).removeClass(r)},unhighlight:function(t,n,r){t.type==="radio"?this.findByName(t.name).removeClass(n).addClass(r):e(t).removeClass(n).addClass(r)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function r(t){var n=e.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");n.settings[r]&&n.settings[r].call(n,this[0],t)}this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var t=this.groups={};e.each(this.settings.groups,function(n,r){typeof r=="string"&&(r=r.split(/\\s/)),e.each(r,function(e,r){t[r]=n})});var n=this.settings.rules;e.each(n,function(t,r){n[t]=e.validator.normalizeRule(r)}),e(this.currentForm).validateDelegate(":text, [type=\'password\'], [type=\'file\'], select, textarea, [type=\'number\'], [type=\'search\'] ,[type=\'tel\'], [type=\'url\'], [type=\'email\'], [type=\'datetime\'], [type=\'date\'], [type=\'month\'], [type=\'week\'], [type=\'time\'], [type=\'datetime-local\'], [type=\'range\'], [type=\'color\'] ","focusin focusout keyup",r).validateDelegate("[type=\'radio\'], [type=\'checkbox\'], select, option","click",r),this.settings.invalidHandler&&e(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t)),this.lastElement=t,this.prepareElement(t),this.currentElements=e(t);var n=this.check(t)!==!1;return n?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),n},showErrors:function(t){if(t){e.extend(this.errorMap,t),this.errorList=[];for(var n in t)this.errorList.push({message:t[n],element:this.findByName(n)[0]});this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t=0;for(var n in e)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&e.grep(this.errorList,function(e){return e.element.name===t.name}).length===1&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in n||!t.objectLength(e(this).rules())?!1:(n[this.name]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return e(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([]),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n=e(t).attr("type"),r=e(t).val();return n==="radio"||n==="checkbox"?e("input[name=\'"+e(t).attr("name")+"\']:checked").val():typeof r=="string"?r.replace(/\\r/g,""):r},check:function(t){t=this.validationTargetFor(this.clean(t));var n=e(t).rules(),r=!1,i=this.elementValue(t),s;for(var o in n){var u={method:o,parameters:n[o]};try{s=e.validator.methods[o].call(this,i,t,u.parameters);if(s==="dependency-mismatch"){r=!0;continue}r=!1;if(s==="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!s)return this.formatAndAdd(t,u),!1}catch(a){throw this.settings.debug&&window.console&&console.log("Exception occured when checking element "+t.id+", check the \'"+u.method+"\' method.",a),a}}if(r)return;return this.objectLength(n)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg-"+n.toLowerCase())||t.attributes&&e(t).attr("data-msg-"+n.toLowerCase())},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==undefined)return arguments[e];return undefined},defaultMessage:function(t,n){return this.findDefined(this.customMessage(t.name,n),this.customDataMessage(t,n),!this.settings.ignoreTitle&&t.title||undefined,e.validator.messages[n],"<strong>Warning: No message defined for "+t.name+"</strong>")},formatAndAdd:function(t,n){var r=this.defaultMessage(t,n.method),i=/\\$?\\{(\\d+)\\}/g;typeof r=="function"?r=r.call(this,n.parameters,t):i.test(r)&&(r=e.validator.format(r.replace(i,"{$1}"),n.parameters)),this.errorList.push({message:r,element:t}),this.errorMap[t.name]=r,this.submitted[t.name]=r},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t;for(e=0;this.errorList[e];e++){var n=this.errorList[e];this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message)}this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(n)):(r=e("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,e(t)):r.insertAfter(t))),!n&&this.settings.success&&(r.text(""),typeof this.settings.success=="string"?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var n=this.idOrName(t);return this.errors().filter(function(){return e(this).attr("for")===n})},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name).not(this.settings.ignore)[0]),e},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name=\'"+t+"\']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return this.dependTypes[typeof e]?this.dependTypes[typeof e](e,t):!0},dependTypes:{"boolean":function(e,t){return e},string:function(t,n){return!!e(t,n.form).length},"function":function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,this.pending[e.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],n&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.formSubmitted=!1):!n&&this.pendingRequest===0&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},r=e(t).attr("class");return r&&e.each(r.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},attributeRules:function(t){var n={},r=e(t);for(var i in e.validator.methods){var s;i==="required"?(s=r.get(0).getAttribute(i),s===""&&(s=!0),s=!!s):s=r.attr(i),s?n[i]=s:r[0].getAttribute("type")===i&&(n[i]=!0)}return n.maxlength&&/-1|2147483647|524288/.test(n.maxlength)&&delete n.maxlength,n},dataRules:function(t){var n,r,i={},s=e(t);for(n in e.validator.methods)r=s.data("rule-"+n.toLowerCase()),r!==undefined&&(i[n]=r);return i},staticRules:function(t){var n={},r=e.data(t.form,"validator");return r.settings.rules&&(n=e.validator.normalizeRule(r.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(r,i){if(i===!1){delete t[r];return}if(i.param||i.depends){var s=!0;switch(typeof i.depends){case"string":s=!!e(i.depends,n.form).length;break;case"function":s=i.depends.call(n,n)}s?t[r]=i.param!==undefined?i.param:!0:delete t[r]}}),e.each(t,function(r,i){t[r]=e.isFunction(i)?i(n):i}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength"],function(){var n;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:typeof t[this]=="string"&&(n=t[this].split(/[\\s,]+/),t[this]=[Number(n[0]),Number(n[1])]))}),e.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if(typeof t=="string"){var n={};e.each(t.split(/\\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,r){e.validator.methods[t]=n,e.validator.messages[t]=r!==undefined?r:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,r){if(!this.depend(r,n))return"dependency-mismatch";if(n.nodeName.toLowerCase()==="select"){var i=e(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(t,n)>0:e.trim(t).length>0},remote:function(t,n,r){if(this.optional(n))return"dependency-mismatch";var i=this.previousValue(n);this.settings.messages[n.name]||(this.settings.messages[n.name]={}),i.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=i.message,r=typeof r=="string"&&{url:r}||r;if(i.old===t)return i.valid;i.old=t;var s=this;this.startRequest(n);var o={};return o[n.name]=t,e.ajax(e.extend(!0,{url:r,mode:"abort",port:"validate"+n.name,dataType:"json",data:o,success:function(r){s.settings.messages[n.name].remote=i.originalMessage;var o=r===!0||r==="true";if(o){var u=s.formSubmitted;s.prepareElement(n),s.formSubmitted=u,s.successList.push(n),delete s.invalid[n.name],s.showErrors()}else{var a={},f=r||s.defaultMessage(n,"remote");a[n.name]=i.message=e.isFunction(f)?f(t):f,s.invalid[n.name]=!0,s.showErrors(a)}i.valid=o,s.stopRequest(n,o)}},r)),"pending"},minlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r},maxlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i<=r},rangelength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r[0]&&i<=r[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},email:function(e,t){return this.optional(t)||/^((([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&\'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i.test(e)},url:function(e,t){return this.optional(t)||/^(https?|s?ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test((new Date(e)).toString())},dateISO:function(e,t){return this.optional(t)||/^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/.test(e)},number:function(e,t){return this.optional(t)||/^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\\d+$/.test(e)},creditcard:function(e,t){if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \\-]+/.test(e))return!1;var n=0,r=0,i=!1;e=e.replace(/\\D/g,"");for(var s=e.length-1;s>=0;s--){var o=e.charAt(s);r=parseInt(o,10),i&&(r*=2)>9&&(r-=9),n+=r,i=!i}return n%10===0},equalTo:function(t,n,r){var i=e(r);return this.settings.onfocusout&&i.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){e(n).valid()}),t===i.val()}}}),e.format=e.validator.format})(jQuery),function(e){var t={};if(e.ajaxPrefilter)e.ajaxPrefilter(function(e,n,r){var i=e.port;e.mode==="abort"&&(t[i]&&t[i].abort(),t[i]=r)});else{var n=e.ajax;e.ajax=function(r){var i=("mode"in r?r:e.ajaxSettings).mode,s=("port"in r?r:e.ajaxSettings).port;return i==="abort"?(t[s]&&t[s].abort(),t[s]=n.apply(this,arguments)):n.apply(this,arguments)}}}(jQuery),function(e){e.extend(e.fn,{validateDelegate:function(t,n,r){return this.bind(n,function(n){var i=e(n.target);if(i.is(t))return r.apply(i,arguments)})}})}(jQuery);
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -39,7 +37,7 @@ ...@@ -39,7 +37,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>20886</int> </value> <value> <int>21068</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
This Business Template contains only static files of jquery validation plugin 1.11.0. This Business Template contains only static files of jquery validation plugin 1.11.1.
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation * http://docs.jquery.com/Plugins/Validation
\ No newline at end of file
2 3
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment