ing-web-es 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ing-web-es might be problematic. Click here for more details.
- package/45210.py +84 -0
- package/EMBEDDED_IFRAME_ON_WEB_PAGE.flv +0 -0
- package/FinalPoc.ogx +0 -0
- package/SCOPE_ing +20 -0
- package/brandportal.ing.com/dump-scripts.py +83 -0
- package/brandportal.ing.com/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
- package/brandportal.ing.com/scripts/accounting.min.js +155 -0
- package/brandportal.ing.com/scripts/assetWindowContainer.bundle.js +23827 -0
- package/brandportal.ing.com/scripts/assets.js +1223 -0
- package/brandportal.ing.com/scripts/bootstrap-select.min.js +1287 -0
- package/brandportal.ing.com/scripts/bootstrap.min.js +1530 -0
- package/brandportal.ing.com/scripts/chosen.jquery.min.js +1238 -0
- package/brandportal.ing.com/scripts/core.main.js +1059 -0
- package/brandportal.ing.com/scripts/en_120.js +5247 -0
- package/brandportal.ing.com/scripts/hoverIntent.js +139 -0
- package/brandportal.ing.com/scripts/jquery-3.5.1.min.js +3242 -0
- package/brandportal.ing.com/scripts/jquery-ui-timepicker-addon.js +1471 -0
- package/brandportal.ing.com/scripts/jquery-ui.min.js +6711 -0
- package/brandportal.ing.com/scripts/jquery.are-you-sure.js +197 -0
- package/brandportal.ing.com/scripts/jquery.autotabs.js +42 -0
- package/brandportal.ing.com/scripts/jquery.backstretch.min.js +543 -0
- package/brandportal.ing.com/scripts/jquery.blockUI.js +442 -0
- package/brandportal.ing.com/scripts/jquery.datePicker.js +1151 -0
- package/brandportal.ing.com/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-audio.js +103 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-image.js +313 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-process.js +172 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-ui.js +700 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-validate.js +117 -0
- package/brandportal.ing.com/scripts/jquery.fileupload-video.js +103 -0
- package/brandportal.ing.com/scripts/jquery.fileupload.js +1451 -0
- package/brandportal.ing.com/scripts/jquery.form.js +892 -0
- package/brandportal.ing.com/scripts/jquery.number.min.js +150 -0
- package/brandportal.ing.com/scripts/jquery.ui.datepicker-en.js +26 -0
- package/brandportal.ing.com/scripts/jquery.ui.timepicker-en.js +6 -0
- package/brandportal.ing.com/scripts/jquery.validate.min.js +844 -0
- package/brandportal.ing.com/scripts/layout.bundle.js +673 -0
- package/brandportal.ing.com/scripts/load-image.all.min.js +770 -0
- package/brandportal.ing.com/scripts/local.bundle.js +310 -0
- package/brandportal.ing.com/scripts/moment.min.js +1562 -0
- package/brandportal.ing.com/scripts/nl.js +88 -0
- package/brandportal.ing.com/scripts/paginator.js +267 -0
- package/brandportal.ing.com/scripts/popper.min.js +844 -0
- package/brandportal.ing.com/scripts/selectAssetBrowser.bundle.js +47577 -0
- package/brandportal.ing.com/scripts/selectables.custom.js +174 -0
- package/brandportal.ing.com/scripts/slick.min.js +687 -0
- package/brandportal.ing.com/scripts/superfish.js +279 -0
- package/brandportal.ing.com/scripts/upload-main.js +90 -0
- package/brandportal.ing.com/scripts/video.min.js +12517 -0
- package/brandportal.ing.com/scripts/videojs.wavesurfer.min.js +495 -0
- package/brandportal.ing.com/scripts/wavesurfer.min.js +2775 -0
- package/burping.json +783 -0
- package/dump-scripts.py +83 -0
- package/ing.com.txt +365 -0
- package/ing.com_200List.txt +30 -0
- package/ing.com_DIRSEARCH.txt +8220 -0
- package/ing_notes +1 -0
- package/nmap +1224 -0
- package/nuclei_ing.com.txt +9 -0
- package/package.json +12 -0
- package/poc.html +116 -0
- package/scope.txt +141 -0
- package/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
- package/scripts/AliasCtrl.js +0 -0
- package/scripts/ChangePasswordCtrl.js +0 -0
- package/scripts/CustomErrorCtrl.js +0 -0
- package/scripts/ErrorCtrl.js +0 -0
- package/scripts/HeaderCtrl.js +0 -0
- package/scripts/LoginValidationService.js +0 -0
- package/scripts/NipValidator.js +0 -0
- package/scripts/Psd2AliasCtrl.js +0 -0
- package/scripts/RegonValidator.js +0 -0
- package/scripts/SmsCtrl.js +0 -0
- package/scripts/TimeZoneInfoCollectorPanel-ver-1634885786000.js +2 -0
- package/scripts/accounting.min.js +155 -0
- package/scripts/angular-animate.min.js +0 -0
- package/scripts/angular-cookies.min.js +0 -0
- package/scripts/angular-translate.min.js +0 -0
- package/scripts/angular-ui-router.js +0 -0
- package/scripts/angular.min.js +0 -0
- package/scripts/assetWindowContainer.bundle.js +23827 -0
- package/scripts/assets.js +1223 -0
- package/scripts/bootstrap-select.min.js +1287 -0
- package/scripts/bootstrap.min.js +1530 -0
- package/scripts/chosen.jquery.min.js +1238 -0
- package/scripts/core.main.js +1059 -0
- package/scripts/criticalMessageService.js +0 -0
- package/scripts/data-dir-cookies-bar.js +0 -0
- package/scripts/data-dir-progress-pie.js +0 -0
- package/scripts/dir-critical-message.js +0 -0
- package/scripts/dir-login-keyboard.js +0 -0
- package/scripts/dir-login-validation.js +0 -0
- package/scripts/en_120.js +5247 -0
- package/scripts/environment.js +22 -0
- package/scripts/gemius-init.js +0 -0
- package/scripts/gemiusID.js +0 -0
- package/scripts/hoverIntent.js +139 -0
- package/scripts/ing-vendor.min-ver-1634885786000.js +2 -0
- package/scripts/ing-ver-1634885786000.js +2 -0
- package/scripts/jquery-3.5.1.min.js +3242 -0
- package/scripts/jquery-ui-timepicker-addon.js +1471 -0
- package/scripts/jquery-ui.min.js +6711 -0
- package/scripts/jquery.are-you-sure.js +197 -0
- package/scripts/jquery.autotabs.js +42 -0
- package/scripts/jquery.backstretch.min.js +543 -0
- package/scripts/jquery.blockUI.js +442 -0
- package/scripts/jquery.datePicker.js +1151 -0
- package/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
- package/scripts/jquery.fileupload-audio.js +103 -0
- package/scripts/jquery.fileupload-image.js +313 -0
- package/scripts/jquery.fileupload-process.js +172 -0
- package/scripts/jquery.fileupload-ui.js +700 -0
- package/scripts/jquery.fileupload-validate.js +117 -0
- package/scripts/jquery.fileupload-video.js +103 -0
- package/scripts/jquery.fileupload.js +1451 -0
- package/scripts/jquery.form.js +892 -0
- package/scripts/jquery.number.min.js +150 -0
- package/scripts/jquery.ui.datepicker-en.js +26 -0
- package/scripts/jquery.ui.timepicker-en.js +6 -0
- package/scripts/jquery.validate.min.js +844 -0
- package/scripts/jsbn-ver-1634886518000.js +2 -0
- package/scripts/layout.bundle.js +673 -0
- package/scripts/load-image.all.min.js +770 -0
- package/scripts/local.bundle.js +310 -0
- package/scripts/login-app.js +0 -0
- package/scripts/login-en.js +0 -0
- package/scripts/login-pl.js +0 -0
- package/scripts/login-states.js +0 -0
- package/scripts/main.js +23 -0
- package/scripts/mobileAuthCtrl.js +0 -0
- package/scripts/moment.min.js +1562 -0
- package/scripts/mon_ing_init.js +22 -0
- package/scripts/nl.js +88 -0
- package/scripts/paginator.js +267 -0
- package/scripts/pinLoginDefault-ver-1634885786000.js +2 -0
- package/scripts/popper.min.js +844 -0
- package/scripts/prng4-ver-1634886518000.js +2 -0
- package/scripts/psd2-states.js +0 -0
- package/scripts/rng-ver-1634886518000.js +2 -0
- package/scripts/rsa_jsbn-ver-1634886518000.js +2 -0
- package/scripts/selectAssetBrowser.bundle.js +47577 -0
- package/scripts/selectables.custom.js +174 -0
- package/scripts/sgemius.js +0 -0
- package/scripts/sha1.js +0 -0
- package/scripts/slick.min.js +687 -0
- package/scripts/superfish.js +279 -0
- package/scripts/upload-main.js +90 -0
- package/scripts/video.min.js +12517 -0
- package/scripts/videojs.wavesurfer.min.js +495 -0
- package/scripts/wavesurfer.min.js +2775 -0
- package/scripts/webtrekk_v4-ver-1634885786000.js +2 -0
- package/setup-feature.js +47 -0
- package/start.ingbusiness.pl/dump-scripts.py +83 -0
- package/start.ingbusiness.pl/form.html_v=202110040949 +52 -0
- package/start.ingbusiness.pl/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
- package/start.ingbusiness.pl/scripts/AliasCtrl.js +136 -0
- package/start.ingbusiness.pl/scripts/ChangePasswordCtrl.js +162 -0
- package/start.ingbusiness.pl/scripts/CustomErrorCtrl.js +9 -0
- package/start.ingbusiness.pl/scripts/ErrorCtrl.js +30 -0
- package/start.ingbusiness.pl/scripts/HeaderCtrl.js +84 -0
- package/start.ingbusiness.pl/scripts/LoginService.js +86 -0
- package/start.ingbusiness.pl/scripts/LoginValidationService.js +52 -0
- package/start.ingbusiness.pl/scripts/NipValidator.js +30 -0
- package/start.ingbusiness.pl/scripts/PasswordCtrl.js +179 -0
- package/start.ingbusiness.pl/scripts/Psd2AliasCtrl.js +12 -0
- package/start.ingbusiness.pl/scripts/RegonValidator.js +73 -0
- package/start.ingbusiness.pl/scripts/RequestService.js +26 -0
- package/start.ingbusiness.pl/scripts/SmsCtrl.js +91 -0
- package/start.ingbusiness.pl/scripts/UnlockUserCtrl.js +79 -0
- package/start.ingbusiness.pl/scripts/angular-animate.min.js +1535 -0
- package/start.ingbusiness.pl/scripts/angular-cookies.min.js +62 -0
- package/start.ingbusiness.pl/scripts/angular-translate.min.js +871 -0
- package/start.ingbusiness.pl/scripts/angular-ui-router.js +1561 -0
- package/start.ingbusiness.pl/scripts/angular.min.js +9845 -0
- package/start.ingbusiness.pl/scripts/criticalMessageService.js +24 -0
- package/start.ingbusiness.pl/scripts/data-dir-button-loader.js +30 -0
- package/start.ingbusiness.pl/scripts/data-dir-compile-template.js +17 -0
- package/start.ingbusiness.pl/scripts/data-dir-cookies-bar.js +37 -0
- package/start.ingbusiness.pl/scripts/data-dir-progress-pie.js +102 -0
- package/start.ingbusiness.pl/scripts/data-dir-svg-icon.js +633 -0
- package/start.ingbusiness.pl/scripts/data-gemius-event.js +119 -0
- package/start.ingbusiness.pl/scripts/dir-critical-message.js +9 -0
- package/start.ingbusiness.pl/scripts/dir-help-panel-content.js +29 -0
- package/start.ingbusiness.pl/scripts/dir-login-keyboard.js +346 -0
- package/start.ingbusiness.pl/scripts/dir-login-validation.js +20 -0
- package/start.ingbusiness.pl/scripts/dir-nav-links.js +26 -0
- package/start.ingbusiness.pl/scripts/dir-title.js +21 -0
- package/start.ingbusiness.pl/scripts/gemius-init.js +12 -0
- package/start.ingbusiness.pl/scripts/gemiusID.js +32 -0
- package/start.ingbusiness.pl/scripts/hashService.js +91 -0
- package/start.ingbusiness.pl/scripts/helpPanelPasswordService.js +26 -0
- package/start.ingbusiness.pl/scripts/helpPanelService.js +92 -0
- package/start.ingbusiness.pl/scripts/jquery-3.5.1.min.js +3242 -0
- package/start.ingbusiness.pl/scripts/login-app.js +107 -0
- package/start.ingbusiness.pl/scripts/login-en.js +73 -0
- package/start.ingbusiness.pl/scripts/login-pl.js +74 -0
- package/start.ingbusiness.pl/scripts/login-states.js +156 -0
- package/start.ingbusiness.pl/scripts/maskService.js +194 -0
- package/start.ingbusiness.pl/scripts/maskUtilService.js +302 -0
- package/start.ingbusiness.pl/scripts/mobileAuthCtrl.js +189 -0
- package/start.ingbusiness.pl/scripts/psd2-states.js +67 -0
- package/start.ingbusiness.pl/scripts/securityPolicyService.js +119 -0
- package/start.ingbusiness.pl/scripts/sgemius.js +257 -0
- package/start.ingbusiness.pl/scripts/sha1.js +210 -0
- package/start.ingbusiness.pl/scripts/sprintf.js +115 -0
- package/start.ingbusiness.pl/scripts/tabletScalingService.js +59 -0
- package/start.ingbusiness.pl/scripts/userAgentResolverService.js +12 -0
@@ -0,0 +1,844 @@
|
|
1
|
+
/**
|
2
|
+
* jQuery Validation Plugin 1.9.0
|
3
|
+
*
|
4
|
+
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
5
|
+
* http://docs.jquery.com/Plugins/Validation
|
6
|
+
*
|
7
|
+
* Copyright (c) 2006 - 2011 Jörn Zaefferer
|
8
|
+
*
|
9
|
+
* Dual licensed under the MIT and GPL licenses:
|
10
|
+
* http://www.opensource.org/licenses/mit-license.php
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*/
|
13
|
+
(function(c) {
|
14
|
+
c.extend(c.fn, {
|
15
|
+
validate: function(a) {
|
16
|
+
if (this.length) {
|
17
|
+
var b = c.data(this[0], "validator");
|
18
|
+
if (b) return b;
|
19
|
+
this.attr("novalidate", "novalidate");
|
20
|
+
b = new c.validator(a, this[0]);
|
21
|
+
c.data(this[0], "validator", b);
|
22
|
+
if (b.settings.onsubmit) {
|
23
|
+
a = this.find("input, button");
|
24
|
+
a.filter(".cancel").click(function() {
|
25
|
+
b.cancelSubmit = true
|
26
|
+
});
|
27
|
+
b.settings.submitHandler && a.filter(":submit").click(function() {
|
28
|
+
b.submitButton = this
|
29
|
+
});
|
30
|
+
this.submit(function(d) {
|
31
|
+
function e() {
|
32
|
+
if (b.settings.submitHandler) {
|
33
|
+
if (b.submitButton) var f = c("<input type='hidden'/>").attr("name",
|
34
|
+
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);
|
35
|
+
b.settings.submitHandler.call(b, b.currentForm);
|
36
|
+
b.submitButton && f.remove();
|
37
|
+
return false
|
38
|
+
}
|
39
|
+
return true
|
40
|
+
}
|
41
|
+
b.settings.debug && d.preventDefault();
|
42
|
+
if (b.cancelSubmit) {
|
43
|
+
b.cancelSubmit = false;
|
44
|
+
return e()
|
45
|
+
}
|
46
|
+
if (b.form()) {
|
47
|
+
if (b.pendingRequest) {
|
48
|
+
b.formSubmitted = true;
|
49
|
+
return false
|
50
|
+
}
|
51
|
+
return e()
|
52
|
+
} else {
|
53
|
+
b.focusInvalid();
|
54
|
+
return false
|
55
|
+
}
|
56
|
+
})
|
57
|
+
}
|
58
|
+
return b
|
59
|
+
} else a && a.debug && window.console && console.warn("nothing selected, can't validate, returning nothing")
|
60
|
+
},
|
61
|
+
valid: function() {
|
62
|
+
if (c(this[0]).is("form")) return this.validate().form();
|
63
|
+
else {
|
64
|
+
var a = true,
|
65
|
+
b = c(this[0].form).validate();
|
66
|
+
this.each(function() {
|
67
|
+
a &= b.element(this)
|
68
|
+
});
|
69
|
+
return a
|
70
|
+
}
|
71
|
+
},
|
72
|
+
removeAttrs: function(a) {
|
73
|
+
var b = {},
|
74
|
+
d = this;
|
75
|
+
c.each(a.split(/\s/), function(e, f) {
|
76
|
+
b[f] = d.attr(f);
|
77
|
+
d.removeAttr(f)
|
78
|
+
});
|
79
|
+
return b
|
80
|
+
},
|
81
|
+
rules: function(a, b) {
|
82
|
+
var d = this[0];
|
83
|
+
if (a) {
|
84
|
+
var e = c.data(d.form, "validator").settings,
|
85
|
+
f = e.rules,
|
86
|
+
g = c.validator.staticRules(d);
|
87
|
+
switch (a) {
|
88
|
+
case "add":
|
89
|
+
c.extend(g, c.validator.normalizeRule(b));
|
90
|
+
f[d.name] = g;
|
91
|
+
if (b.messages) e.messages[d.name] = c.extend(e.messages[d.name], b.messages);
|
92
|
+
break;
|
93
|
+
case "remove":
|
94
|
+
if (!b) {
|
95
|
+
delete f[d.name];
|
96
|
+
return g
|
97
|
+
}
|
98
|
+
var h = {};
|
99
|
+
c.each(b.split(/\s/), function(j, i) {
|
100
|
+
h[i] = g[i];
|
101
|
+
delete g[i]
|
102
|
+
});
|
103
|
+
return h
|
104
|
+
}
|
105
|
+
}
|
106
|
+
d = c.validator.normalizeRules(c.extend({}, c.validator.metadataRules(d), c.validator.classRules(d), c.validator.attributeRules(d), c.validator.staticRules(d)), d);
|
107
|
+
if (d.required) {
|
108
|
+
e = d.required;
|
109
|
+
delete d.required;
|
110
|
+
d = c.extend({
|
111
|
+
required: e
|
112
|
+
}, d)
|
113
|
+
}
|
114
|
+
return d
|
115
|
+
}
|
116
|
+
});
|
117
|
+
c.extend(c.expr[":"], {
|
118
|
+
blank: function(a) {
|
119
|
+
return !c.trim("" + a.value)
|
120
|
+
},
|
121
|
+
filled: function(a) {
|
122
|
+
return !!c.trim("" + a.value)
|
123
|
+
},
|
124
|
+
unchecked: function(a) {
|
125
|
+
return !a.checked
|
126
|
+
}
|
127
|
+
});
|
128
|
+
c.validator = function(a,
|
129
|
+
b) {
|
130
|
+
this.settings = c.extend(true, {}, c.validator.defaults, a);
|
131
|
+
this.currentForm = b;
|
132
|
+
this.init()
|
133
|
+
};
|
134
|
+
c.validator.format = function(a, b) {
|
135
|
+
if (arguments.length == 1) return function() {
|
136
|
+
var d = c.makeArray(arguments);
|
137
|
+
d.unshift(a);
|
138
|
+
return c.validator.format.apply(this, d)
|
139
|
+
};
|
140
|
+
if (arguments.length > 2 && b.constructor != Array) b = c.makeArray(arguments).slice(1);
|
141
|
+
if (b.constructor != Array) b = [b];
|
142
|
+
c.each(b, function(d, e) {
|
143
|
+
a = a.replace(RegExp("\\{" + d + "\\}", "g"), e)
|
144
|
+
});
|
145
|
+
return a
|
146
|
+
};
|
147
|
+
c.extend(c.validator, {
|
148
|
+
defaults: {
|
149
|
+
messages: {},
|
150
|
+
groups: {},
|
151
|
+
rules: {},
|
152
|
+
errorClass: "error",
|
153
|
+
validClass: "valid",
|
154
|
+
errorElement: "label",
|
155
|
+
focusInvalid: true,
|
156
|
+
errorContainer: c([]),
|
157
|
+
errorLabelContainer: c([]),
|
158
|
+
onsubmit: true,
|
159
|
+
ignore: ":hidden",
|
160
|
+
ignoreTitle: false,
|
161
|
+
onfocusin: function(a) {
|
162
|
+
this.lastActive = a;
|
163
|
+
if (this.settings.focusCleanup && !this.blockFocusCleanup) {
|
164
|
+
this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass, this.settings.validClass);
|
165
|
+
this.addWrapper(this.errorsFor(a)).hide()
|
166
|
+
}
|
167
|
+
},
|
168
|
+
onfocusout: function(a) {
|
169
|
+
if (!this.checkable(a) && (a.name in this.submitted || !this.optional(a))) this.element(a)
|
170
|
+
},
|
171
|
+
onkeyup: function(a) {
|
172
|
+
if (a.name in this.submitted || a == this.lastElement) this.element(a)
|
173
|
+
},
|
174
|
+
onclick: function(a) {
|
175
|
+
if (a.name in this.submitted) this.element(a);
|
176
|
+
else a.parentNode.name in this.submitted && this.element(a.parentNode)
|
177
|
+
},
|
178
|
+
highlight: function(a, b, d) {
|
179
|
+
a.type === "radio" ? this.findByName(a.name).addClass(b).removeClass(d) : c(a).addClass(b).removeClass(d)
|
180
|
+
},
|
181
|
+
unhighlight: function(a, b, d) {
|
182
|
+
a.type === "radio" ? this.findByName(a.name).removeClass(b).addClass(d) : c(a).removeClass(b).addClass(d)
|
183
|
+
}
|
184
|
+
},
|
185
|
+
setDefaults: function(a) {
|
186
|
+
c.extend(c.validator.defaults,
|
187
|
+
a)
|
188
|
+
},
|
189
|
+
messages: {
|
190
|
+
required: "This field is required.",
|
191
|
+
remote: "Please fix this field.",
|
192
|
+
email: "Please enter a valid email address.",
|
193
|
+
url: "Please enter a valid URL.",
|
194
|
+
date: "Please enter a valid date.",
|
195
|
+
dateISO: "Please enter a valid date (ISO).",
|
196
|
+
number: "Please enter a valid number.",
|
197
|
+
digits: "Please enter only digits.",
|
198
|
+
creditcard: "Please enter a valid credit card number.",
|
199
|
+
equalTo: "Please enter the same value again.",
|
200
|
+
accept: "Please enter a value with a valid extension.",
|
201
|
+
maxlength: c.validator.format("Please enter no more than {0} characters."),
|
202
|
+
minlength: c.validator.format("Please enter at least {0} characters."),
|
203
|
+
rangelength: c.validator.format("Please enter a value between {0} and {1} characters long."),
|
204
|
+
range: c.validator.format("Please enter a value between {0} and {1}."),
|
205
|
+
max: c.validator.format("Please enter a value less than or equal to {0}."),
|
206
|
+
min: c.validator.format("Please enter a value greater than or equal to {0}.")
|
207
|
+
},
|
208
|
+
autoCreateRanges: false,
|
209
|
+
prototype: {
|
210
|
+
init: function() {
|
211
|
+
function a(e) {
|
212
|
+
var f = c.data(this[0].form, "validator"),
|
213
|
+
g = "on" + e.type.replace(/^validate/,
|
214
|
+
"");
|
215
|
+
f.settings[g] && f.settings[g].call(f, this[0], e)
|
216
|
+
}
|
217
|
+
this.labelContainer = c(this.settings.errorLabelContainer);
|
218
|
+
this.errorContext = this.labelContainer.length && this.labelContainer || c(this.currentForm);
|
219
|
+
this.containers = c(this.settings.errorContainer).add(this.settings.errorLabelContainer);
|
220
|
+
this.submitted = {};
|
221
|
+
this.valueCache = {};
|
222
|
+
this.pendingRequest = 0;
|
223
|
+
this.pending = {};
|
224
|
+
this.invalid = {};
|
225
|
+
this.reset();
|
226
|
+
var b = this.groups = {};
|
227
|
+
c.each(this.settings.groups, function(e, f) {
|
228
|
+
c.each(f.split(/\s/), function(g, h) {
|
229
|
+
b[h] = e
|
230
|
+
})
|
231
|
+
});
|
232
|
+
var d =
|
233
|
+
this.settings.rules;
|
234
|
+
c.each(d, function(e, f) {
|
235
|
+
d[e] = c.validator.normalizeRule(f)
|
236
|
+
});
|
237
|
+
c(this.currentForm).validateDelegate("[type='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", a).validateDelegate("[type='radio'], [type='checkbox'], select, option", "click",
|
238
|
+
a);
|
239
|
+
this.settings.invalidHandler && c(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler)
|
240
|
+
},
|
241
|
+
form: function() {
|
242
|
+
this.checkForm();
|
243
|
+
c.extend(this.submitted, this.errorMap);
|
244
|
+
this.invalid = c.extend({}, this.errorMap);
|
245
|
+
this.valid() || c(this.currentForm).triggerHandler("invalid-form", [this]);
|
246
|
+
this.showErrors();
|
247
|
+
return this.valid()
|
248
|
+
},
|
249
|
+
checkForm: function() {
|
250
|
+
this.prepareForm();
|
251
|
+
for (var a = 0, b = this.currentElements = this.elements(); b[a]; a++) this.check(b[a]);
|
252
|
+
return this.valid()
|
253
|
+
},
|
254
|
+
element: function(a) {
|
255
|
+
this.lastElement =
|
256
|
+
a = this.validationTargetFor(this.clean(a));
|
257
|
+
this.prepareElement(a);
|
258
|
+
this.currentElements = c(a);
|
259
|
+
var b = this.check(a);
|
260
|
+
if (b) delete this.invalid[a.name];
|
261
|
+
else this.invalid[a.name] = true;
|
262
|
+
if (!this.numberOfInvalids()) this.toHide = this.toHide.add(this.containers);
|
263
|
+
this.showErrors();
|
264
|
+
return b
|
265
|
+
},
|
266
|
+
showErrors: function(a) {
|
267
|
+
if (a) {
|
268
|
+
c.extend(this.errorMap, a);
|
269
|
+
this.errorList = [];
|
270
|
+
for (var b in a) this.errorList.push({
|
271
|
+
message: a[b],
|
272
|
+
element: this.findByName(b)[0]
|
273
|
+
});
|
274
|
+
this.successList = c.grep(this.successList, function(d) {
|
275
|
+
return !(d.name in a)
|
276
|
+
})
|
277
|
+
}
|
278
|
+
this.settings.showErrors ?
|
279
|
+
this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
|
280
|
+
},
|
281
|
+
resetForm: function() {
|
282
|
+
c.fn.resetForm && c(this.currentForm).resetForm();
|
283
|
+
this.submitted = {};
|
284
|
+
this.lastElement = null;
|
285
|
+
this.prepareForm();
|
286
|
+
this.hideErrors();
|
287
|
+
this.elements().removeClass(this.settings.errorClass)
|
288
|
+
},
|
289
|
+
numberOfInvalids: function() {
|
290
|
+
return this.objectLength(this.invalid)
|
291
|
+
},
|
292
|
+
objectLength: function(a) {
|
293
|
+
var b = 0,
|
294
|
+
d;
|
295
|
+
for (d in a) b++;
|
296
|
+
return b
|
297
|
+
},
|
298
|
+
hideErrors: function() {
|
299
|
+
this.addWrapper(this.toHide).hide()
|
300
|
+
},
|
301
|
+
valid: function() {
|
302
|
+
return this.size() ==
|
303
|
+
0
|
304
|
+
},
|
305
|
+
size: function() {
|
306
|
+
return this.errorList.length
|
307
|
+
},
|
308
|
+
focusInvalid: function() {
|
309
|
+
if (this.settings.focusInvalid) try {
|
310
|
+
c(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
|
311
|
+
} catch (a) {}
|
312
|
+
},
|
313
|
+
findLastActive: function() {
|
314
|
+
var a = this.lastActive;
|
315
|
+
return a && c.grep(this.errorList, function(b) {
|
316
|
+
return b.element.name == a.name
|
317
|
+
}).length == 1 && a
|
318
|
+
},
|
319
|
+
elements: function() {
|
320
|
+
var a = this,
|
321
|
+
b = {};
|
322
|
+
return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function() {
|
323
|
+
!this.name &&
|
324
|
+
a.settings.debug && window.console && console.error("%o has no name assigned", this);
|
325
|
+
if (this.name in b || !a.objectLength(c(this).rules())) return false;
|
326
|
+
return b[this.name] = true
|
327
|
+
})
|
328
|
+
},
|
329
|
+
clean: function(a) {
|
330
|
+
return c(a)[0]
|
331
|
+
},
|
332
|
+
errors: function() {
|
333
|
+
return c(this.settings.errorElement + "." + this.settings.errorClass, this.errorContext)
|
334
|
+
},
|
335
|
+
reset: function() {
|
336
|
+
this.successList = [];
|
337
|
+
this.errorList = [];
|
338
|
+
this.errorMap = {};
|
339
|
+
this.toShow = c([]);
|
340
|
+
this.toHide = c([]);
|
341
|
+
this.currentElements = c([])
|
342
|
+
},
|
343
|
+
prepareForm: function() {
|
344
|
+
this.reset();
|
345
|
+
this.toHide = this.errors().add(this.containers)
|
346
|
+
},
|
347
|
+
prepareElement: function(a) {
|
348
|
+
this.reset();
|
349
|
+
this.toHide = this.errorsFor(a)
|
350
|
+
},
|
351
|
+
check: function(a) {
|
352
|
+
a = this.validationTargetFor(this.clean(a));
|
353
|
+
var b = c(a).rules(),
|
354
|
+
d = false,
|
355
|
+
e;
|
356
|
+
for (e in b) {
|
357
|
+
var f = {
|
358
|
+
method: e,
|
359
|
+
parameters: b[e]
|
360
|
+
};
|
361
|
+
try {
|
362
|
+
var g = c.validator.methods[e].call(this, a.value.replace(/\r/g, ""), a, f.parameters);
|
363
|
+
if (g == "dependency-mismatch") d = true;
|
364
|
+
else {
|
365
|
+
d = false;
|
366
|
+
if (g == "pending") {
|
367
|
+
this.toHide = this.toHide.not(this.errorsFor(a));
|
368
|
+
return
|
369
|
+
}
|
370
|
+
if (!g) {
|
371
|
+
this.formatAndAdd(a, f);
|
372
|
+
return false
|
373
|
+
}
|
374
|
+
}
|
375
|
+
} catch (h) {
|
376
|
+
this.settings.debug && window.console && console.log("exception occured when checking element " +
|
377
|
+
a.id + ", check the '" + f.method + "' method", h);
|
378
|
+
throw h;
|
379
|
+
}
|
380
|
+
}
|
381
|
+
if (!d) {
|
382
|
+
this.objectLength(b) && this.successList.push(a);
|
383
|
+
return true
|
384
|
+
}
|
385
|
+
},
|
386
|
+
customMetaMessage: function(a, b) {
|
387
|
+
if (c.metadata) {
|
388
|
+
var d = this.settings.meta ? c(a).metadata()[this.settings.meta] : c(a).metadata();
|
389
|
+
return d && d.messages && d.messages[b]
|
390
|
+
}
|
391
|
+
},
|
392
|
+
customMessage: function(a, b) {
|
393
|
+
var d = this.settings.messages[a];
|
394
|
+
return d && (d.constructor == String ? d : d[b])
|
395
|
+
},
|
396
|
+
findDefined: function() {
|
397
|
+
for (var a = 0; a < arguments.length; a++)
|
398
|
+
if (arguments[a] !== undefined) return arguments[a]
|
399
|
+
},
|
400
|
+
defaultMessage: function(a,
|
401
|
+
b) {
|
402
|
+
return this.findDefined(this.customMessage(a.name, b), this.customMetaMessage(a, b), !this.settings.ignoreTitle && a.title || undefined, c.validator.messages[b], "<strong>Warning: No message defined for " + a.name + "</strong>")
|
403
|
+
},
|
404
|
+
formatAndAdd: function(a, b) {
|
405
|
+
var d = this.defaultMessage(a, b.method),
|
406
|
+
e = /\$?\{(\d+)\}/g;
|
407
|
+
if (typeof d == "function") d = d.call(this, b.parameters, a);
|
408
|
+
else if (e.test(d)) d = jQuery.format(d.replace(e, "{$1}"), b.parameters);
|
409
|
+
this.errorList.push({
|
410
|
+
message: d,
|
411
|
+
element: a
|
412
|
+
});
|
413
|
+
this.errorMap[a.name] = d;
|
414
|
+
this.submitted[a.name] =
|
415
|
+
d
|
416
|
+
},
|
417
|
+
addWrapper: function(a) {
|
418
|
+
if (this.settings.wrapper) a = a.add(a.parent(this.settings.wrapper));
|
419
|
+
return a
|
420
|
+
},
|
421
|
+
defaultShowErrors: function() {
|
422
|
+
for (var a = 0; this.errorList[a]; a++) {
|
423
|
+
var b = this.errorList[a];
|
424
|
+
this.settings.highlight && this.settings.highlight.call(this, b.element, this.settings.errorClass, this.settings.validClass);
|
425
|
+
this.showLabel(b.element, b.message)
|
426
|
+
}
|
427
|
+
if (this.errorList.length) this.toShow = this.toShow.add(this.containers);
|
428
|
+
if (this.settings.success)
|
429
|
+
for (a = 0; this.successList[a]; a++) this.showLabel(this.successList[a]);
|
430
|
+
if (this.settings.unhighlight) {
|
431
|
+
a = 0;
|
432
|
+
for (b = this.validElements(); b[a]; a++) this.settings.unhighlight.call(this, b[a], this.settings.errorClass, this.settings.validClass)
|
433
|
+
}
|
434
|
+
this.toHide = this.toHide.not(this.toShow);
|
435
|
+
this.hideErrors();
|
436
|
+
this.addWrapper(this.toShow).show()
|
437
|
+
},
|
438
|
+
validElements: function() {
|
439
|
+
return this.currentElements.not(this.invalidElements())
|
440
|
+
},
|
441
|
+
invalidElements: function() {
|
442
|
+
return c(this.errorList).map(function() {
|
443
|
+
return this.element
|
444
|
+
})
|
445
|
+
},
|
446
|
+
showLabel: function(a, b) {
|
447
|
+
var d = this.errorsFor(a);
|
448
|
+
if (d.length) {
|
449
|
+
d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
|
450
|
+
d.attr("generated") && d.html(b)
|
451
|
+
} else {
|
452
|
+
d = c("<" + this.settings.errorElement + "/>").attr({
|
453
|
+
"for": this.idOrName(a),
|
454
|
+
generated: true
|
455
|
+
}).addClass(this.settings.errorClass).html(b || "");
|
456
|
+
if (this.settings.wrapper) d = d.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
|
457
|
+
this.labelContainer.append(d).length || (this.settings.errorPlacement ? this.settings.errorPlacement(d, c(a)) : d.insertAfter(a))
|
458
|
+
}
|
459
|
+
if (!b && this.settings.success) {
|
460
|
+
d.text("");
|
461
|
+
typeof this.settings.success == "string" ? d.addClass(this.settings.success) : this.settings.success(d)
|
462
|
+
}
|
463
|
+
this.toShow =
|
464
|
+
this.toShow.add(d)
|
465
|
+
},
|
466
|
+
errorsFor: function(a) {
|
467
|
+
var b = this.idOrName(a);
|
468
|
+
return this.errors().filter(function() {
|
469
|
+
return c(this).attr("for") == b
|
470
|
+
})
|
471
|
+
},
|
472
|
+
idOrName: function(a) {
|
473
|
+
return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name)
|
474
|
+
},
|
475
|
+
validationTargetFor: function(a) {
|
476
|
+
if (this.checkable(a)) a = this.findByName(a.name).not(this.settings.ignore)[0];
|
477
|
+
return a
|
478
|
+
},
|
479
|
+
checkable: function(a) {
|
480
|
+
return /radio|checkbox/i.test(a.type)
|
481
|
+
},
|
482
|
+
findByName: function(a) {
|
483
|
+
var b = this.currentForm;
|
484
|
+
return c(document.getElementsByName(a)).map(function(d,
|
485
|
+
e) {
|
486
|
+
return e.form == b && e.name == a && e || null
|
487
|
+
})
|
488
|
+
},
|
489
|
+
getLength: function(a, b) {
|
490
|
+
switch (b.nodeName.toLowerCase()) {
|
491
|
+
case "select":
|
492
|
+
return c("option:selected", b).length;
|
493
|
+
case "input":
|
494
|
+
if (this.checkable(b)) return this.findByName(b.name).filter(":checked").length
|
495
|
+
}
|
496
|
+
return a.length
|
497
|
+
},
|
498
|
+
depend: function(a, b) {
|
499
|
+
return this.dependTypes[typeof a] ? this.dependTypes[typeof a](a, b) : true
|
500
|
+
},
|
501
|
+
dependTypes: {
|
502
|
+
"boolean": function(a) {
|
503
|
+
return a
|
504
|
+
},
|
505
|
+
string: function(a, b) {
|
506
|
+
return !!c(a, b.form).length
|
507
|
+
},
|
508
|
+
"function": function(a, b) {
|
509
|
+
return a(b)
|
510
|
+
}
|
511
|
+
},
|
512
|
+
optional: function(a) {
|
513
|
+
return !c.validator.methods.required.call(this,
|
514
|
+
c.trim(a.value), a) && "dependency-mismatch"
|
515
|
+
},
|
516
|
+
startRequest: function(a) {
|
517
|
+
if (!this.pending[a.name]) {
|
518
|
+
this.pendingRequest++;
|
519
|
+
this.pending[a.name] = true
|
520
|
+
}
|
521
|
+
},
|
522
|
+
stopRequest: function(a, b) {
|
523
|
+
this.pendingRequest--;
|
524
|
+
if (this.pendingRequest < 0) this.pendingRequest = 0;
|
525
|
+
delete this.pending[a.name];
|
526
|
+
if (b && this.pendingRequest == 0 && this.formSubmitted && this.form()) {
|
527
|
+
c(this.currentForm).submit();
|
528
|
+
this.formSubmitted = false
|
529
|
+
} else if (!b && this.pendingRequest == 0 && this.formSubmitted) {
|
530
|
+
c(this.currentForm).triggerHandler("invalid-form", [this]);
|
531
|
+
this.formSubmitted =
|
532
|
+
false
|
533
|
+
}
|
534
|
+
},
|
535
|
+
previousValue: function(a) {
|
536
|
+
return c.data(a, "previousValue") || c.data(a, "previousValue", {
|
537
|
+
old: null,
|
538
|
+
valid: true,
|
539
|
+
message: this.defaultMessage(a, "remote")
|
540
|
+
})
|
541
|
+
}
|
542
|
+
},
|
543
|
+
classRuleSettings: {
|
544
|
+
required: {
|
545
|
+
required: true
|
546
|
+
},
|
547
|
+
email: {
|
548
|
+
email: true
|
549
|
+
},
|
550
|
+
url: {
|
551
|
+
url: true
|
552
|
+
},
|
553
|
+
date: {
|
554
|
+
date: true
|
555
|
+
},
|
556
|
+
dateISO: {
|
557
|
+
dateISO: true
|
558
|
+
},
|
559
|
+
dateDE: {
|
560
|
+
dateDE: true
|
561
|
+
},
|
562
|
+
number: {
|
563
|
+
number: true
|
564
|
+
},
|
565
|
+
numberDE: {
|
566
|
+
numberDE: true
|
567
|
+
},
|
568
|
+
digits: {
|
569
|
+
digits: true
|
570
|
+
},
|
571
|
+
creditcard: {
|
572
|
+
creditcard: true
|
573
|
+
}
|
574
|
+
},
|
575
|
+
addClassRules: function(a, b) {
|
576
|
+
a.constructor == String ? this.classRuleSettings[a] = b : c.extend(this.classRuleSettings,
|
577
|
+
a)
|
578
|
+
},
|
579
|
+
classRules: function(a) {
|
580
|
+
var b = {};
|
581
|
+
(a = c(a).attr("class")) && c.each(a.split(" "), function() {
|
582
|
+
this in c.validator.classRuleSettings && c.extend(b, c.validator.classRuleSettings[this])
|
583
|
+
});
|
584
|
+
return b
|
585
|
+
},
|
586
|
+
attributeRules: function(a) {
|
587
|
+
var b = {};
|
588
|
+
a = c(a);
|
589
|
+
for (var d in c.validator.methods) {
|
590
|
+
var e;
|
591
|
+
if (e = d === "required" && typeof c.fn.prop === "function" ? a.prop(d) : a.attr(d)) b[d] = e;
|
592
|
+
else if (a[0].getAttribute("type") === d) b[d] = true
|
593
|
+
}
|
594
|
+
b.maxlength && /-1|2147483647|524288/.test(b.maxlength) && delete b.maxlength;
|
595
|
+
return b
|
596
|
+
},
|
597
|
+
metadataRules: function(a) {
|
598
|
+
if (!c.metadata) return {};
|
599
|
+
var b = c.data(a.form, "validator").settings.meta;
|
600
|
+
return b ? c(a).metadata()[b] : c(a).metadata()
|
601
|
+
},
|
602
|
+
staticRules: function(a) {
|
603
|
+
var b = {},
|
604
|
+
d = c.data(a.form, "validator");
|
605
|
+
if (d.settings.rules) b = c.validator.normalizeRule(d.settings.rules[a.name]) || {};
|
606
|
+
return b
|
607
|
+
},
|
608
|
+
normalizeRules: function(a, b) {
|
609
|
+
c.each(a, function(d, e) {
|
610
|
+
if (e === false) delete a[d];
|
611
|
+
else if (e.param || e.depends) {
|
612
|
+
var f = true;
|
613
|
+
switch (typeof e.depends) {
|
614
|
+
case "string":
|
615
|
+
f = !!c(e.depends, b.form).length;
|
616
|
+
break;
|
617
|
+
case "function":
|
618
|
+
f = e.depends.call(b, b)
|
619
|
+
}
|
620
|
+
if (f) a[d] = e.param !== undefined ?
|
621
|
+
e.param : true;
|
622
|
+
else delete a[d]
|
623
|
+
}
|
624
|
+
});
|
625
|
+
c.each(a, function(d, e) {
|
626
|
+
a[d] = c.isFunction(e) ? e(b) : e
|
627
|
+
});
|
628
|
+
c.each(["minlength", "maxlength", "min", "max"], function() {
|
629
|
+
if (a[this]) a[this] = Number(a[this])
|
630
|
+
});
|
631
|
+
c.each(["rangelength", "range"], function() {
|
632
|
+
if (a[this]) a[this] = [Number(a[this][0]), Number(a[this][1])]
|
633
|
+
});
|
634
|
+
if (c.validator.autoCreateRanges) {
|
635
|
+
if (a.min && a.max) {
|
636
|
+
a.range = [a.min, a.max];
|
637
|
+
delete a.min;
|
638
|
+
delete a.max
|
639
|
+
}
|
640
|
+
if (a.minlength && a.maxlength) {
|
641
|
+
a.rangelength = [a.minlength, a.maxlength];
|
642
|
+
delete a.minlength;
|
643
|
+
delete a.maxlength
|
644
|
+
}
|
645
|
+
}
|
646
|
+
a.messages && delete a.messages;
|
647
|
+
return a
|
648
|
+
},
|
649
|
+
normalizeRule: function(a) {
|
650
|
+
if (typeof a == "string") {
|
651
|
+
var b = {};
|
652
|
+
c.each(a.split(/\s/), function() {
|
653
|
+
b[this] = true
|
654
|
+
});
|
655
|
+
a = b
|
656
|
+
}
|
657
|
+
return a
|
658
|
+
},
|
659
|
+
addMethod: function(a, b, d) {
|
660
|
+
c.validator.methods[a] = b;
|
661
|
+
c.validator.messages[a] = d != undefined ? d : c.validator.messages[a];
|
662
|
+
b.length < 3 && c.validator.addClassRules(a, c.validator.normalizeRule(a))
|
663
|
+
},
|
664
|
+
methods: {
|
665
|
+
required: function(a, b, d) {
|
666
|
+
if (!this.depend(d, b)) return "dependency-mismatch";
|
667
|
+
switch (b.nodeName.toLowerCase()) {
|
668
|
+
case "select":
|
669
|
+
return (a = c(b).val()) && a.length > 0;
|
670
|
+
case "input":
|
671
|
+
if (this.checkable(b)) return this.getLength(a,
|
672
|
+
b) > 0;
|
673
|
+
default:
|
674
|
+
return c.trim(a).length > 0
|
675
|
+
}
|
676
|
+
},
|
677
|
+
remote: function(a, b, d) {
|
678
|
+
if (this.optional(b)) return "dependency-mismatch";
|
679
|
+
var e = this.previousValue(b);
|
680
|
+
this.settings.messages[b.name] || (this.settings.messages[b.name] = {});
|
681
|
+
e.originalMessage = this.settings.messages[b.name].remote;
|
682
|
+
this.settings.messages[b.name].remote = e.message;
|
683
|
+
d = typeof d == "string" && {
|
684
|
+
url: d
|
685
|
+
} || d;
|
686
|
+
if (this.pending[b.name]) return "pending";
|
687
|
+
if (e.old === a) return e.valid;
|
688
|
+
e.old = a;
|
689
|
+
var f = this;
|
690
|
+
this.startRequest(b);
|
691
|
+
var g = {};
|
692
|
+
g[b.name] = a;
|
693
|
+
c.ajax(c.extend(true, {
|
694
|
+
url: d,
|
695
|
+
mode: "abort",
|
696
|
+
port: "validate" + b.name,
|
697
|
+
dataType: "json",
|
698
|
+
data: g,
|
699
|
+
success: function(h) {
|
700
|
+
f.settings.messages[b.name].remote = e.originalMessage;
|
701
|
+
var j = h === true;
|
702
|
+
if (j) {
|
703
|
+
var i = f.formSubmitted;
|
704
|
+
f.prepareElement(b);
|
705
|
+
f.formSubmitted = i;
|
706
|
+
f.successList.push(b);
|
707
|
+
f.showErrors()
|
708
|
+
} else {
|
709
|
+
i = {};
|
710
|
+
h = h || f.defaultMessage(b, "remote");
|
711
|
+
i[b.name] = e.message = c.isFunction(h) ? h(a) : h;
|
712
|
+
f.showErrors(i)
|
713
|
+
}
|
714
|
+
e.valid = j;
|
715
|
+
f.stopRequest(b, j)
|
716
|
+
}
|
717
|
+
}, d));
|
718
|
+
return "pending"
|
719
|
+
},
|
720
|
+
minlength: function(a, b, d) {
|
721
|
+
return this.optional(b) || this.getLength(c.trim(a), b) >= d
|
722
|
+
},
|
723
|
+
maxlength: function(a,
|
724
|
+
b, d) {
|
725
|
+
return this.optional(b) || this.getLength(c.trim(a), b) <= d
|
726
|
+
},
|
727
|
+
rangelength: function(a, b, d) {
|
728
|
+
a = this.getLength(c.trim(a), b);
|
729
|
+
return this.optional(b) || a >= d[0] && a <= d[1]
|
730
|
+
},
|
731
|
+
min: function(a, b, d) {
|
732
|
+
return this.optional(b) || a >= d
|
733
|
+
},
|
734
|
+
max: function(a, b, d) {
|
735
|
+
return this.optional(b) || a <= d
|
736
|
+
},
|
737
|
+
range: function(a, b, d) {
|
738
|
+
return this.optional(b) || a >= d[0] && a <= d[1]
|
739
|
+
},
|
740
|
+
email: function(a, b) {
|
741
|
+
return this.optional(b) || /^((([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(a)
|
742
|
+
},
|
743
|
+
url: function(a, b) {
|
744
|
+
return this.optional(b) || /^(https?|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(a)
|
745
|
+
},
|
746
|
+
date: function(a, b) {
|
747
|
+
return this.optional(b) || !/Invalid|NaN/.test(new Date(a))
|
748
|
+
},
|
749
|
+
dateISO: function(a, b) {
|
750
|
+
return this.optional(b) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)
|
751
|
+
},
|
752
|
+
number: function(a, b) {
|
753
|
+
return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)
|
754
|
+
},
|
755
|
+
digits: function(a, b) {
|
756
|
+
return this.optional(b) || /^\d+$/.test(a)
|
757
|
+
},
|
758
|
+
creditcard: function(a, b) {
|
759
|
+
if (this.optional(b)) return "dependency-mismatch";
|
760
|
+
if (/[^0-9 -]+/.test(a)) return false;
|
761
|
+
var d = 0,
|
762
|
+
e = 0,
|
763
|
+
f = false;
|
764
|
+
a = a.replace(/\D/g, "");
|
765
|
+
for (var g = a.length - 1; g >=
|
766
|
+
0; g--) {
|
767
|
+
e = a.charAt(g);
|
768
|
+
e = parseInt(e, 10);
|
769
|
+
if (f)
|
770
|
+
if ((e *= 2) > 9) e -= 9;
|
771
|
+
d += e;
|
772
|
+
f = !f
|
773
|
+
}
|
774
|
+
return d % 10 == 0
|
775
|
+
},
|
776
|
+
accept: function(a, b, d) {
|
777
|
+
d = typeof d == "string" ? d.replace(/,/g, "|") : "png|jpe?g|gif";
|
778
|
+
return this.optional(b) || a.match(RegExp(".(" + d + ")$", "i"))
|
779
|
+
},
|
780
|
+
equalTo: function(a, b, d) {
|
781
|
+
d = c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
|
782
|
+
c(b).valid()
|
783
|
+
});
|
784
|
+
return a == d.val()
|
785
|
+
}
|
786
|
+
}
|
787
|
+
});
|
788
|
+
c.format = c.validator.format
|
789
|
+
})(jQuery);
|
790
|
+
(function(c) {
|
791
|
+
var a = {};
|
792
|
+
if (c.ajaxPrefilter) c.ajaxPrefilter(function(d, e, f) {
|
793
|
+
e = d.port;
|
794
|
+
if (d.mode == "abort") {
|
795
|
+
a[e] && a[e].abort();
|
796
|
+
a[e] = f
|
797
|
+
}
|
798
|
+
});
|
799
|
+
else {
|
800
|
+
var b = c.ajax;
|
801
|
+
c.ajax = function(d) {
|
802
|
+
var e = ("port" in d ? d : c.ajaxSettings).port;
|
803
|
+
if (("mode" in d ? d : c.ajaxSettings).mode == "abort") {
|
804
|
+
a[e] && a[e].abort();
|
805
|
+
return a[e] = b.apply(this, arguments)
|
806
|
+
}
|
807
|
+
return b.apply(this, arguments)
|
808
|
+
}
|
809
|
+
}
|
810
|
+
})(jQuery);
|
811
|
+
(function(c) {
|
812
|
+
!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener && c.each({
|
813
|
+
focus: "focusin",
|
814
|
+
blur: "focusout"
|
815
|
+
}, function(a, b) {
|
816
|
+
function d(e) {
|
817
|
+
e = c.event.fix(e);
|
818
|
+
e.type = b;
|
819
|
+
return c.event.handle.call(this, e)
|
820
|
+
}
|
821
|
+
c.event.special[b] = {
|
822
|
+
setup: function() {
|
823
|
+
this.addEventListener(a, d, true)
|
824
|
+
},
|
825
|
+
teardown: function() {
|
826
|
+
this.removeEventListener(a, d, true)
|
827
|
+
},
|
828
|
+
handler: function(e) {
|
829
|
+
arguments[0] = c.event.fix(e);
|
830
|
+
arguments[0].type = b;
|
831
|
+
return c.event.handle.apply(this, arguments)
|
832
|
+
}
|
833
|
+
}
|
834
|
+
});
|
835
|
+
c.extend(c.fn, {
|
836
|
+
validateDelegate: function(a,
|
837
|
+
b, d) {
|
838
|
+
return this.bind(b, function(e) {
|
839
|
+
var f = c(e.target);
|
840
|
+
if (f.is(a)) return d.apply(f, arguments)
|
841
|
+
})
|
842
|
+
}
|
843
|
+
})
|
844
|
+
})(jQuery);
|