PageSourceSearch

https://matuokahp.com/js/jquery/jquery-validation/jquery.validate.js?1675843949

js matuokahp.com collected 2026-10-05 10:31:09 UTC 58,367 bytes, 1,694 lines download raw bytes

1/*!
2 * jQuery Validation Plugin 1.11.1
3 *
4 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
5 * http://docs.jquery.com/Plugins/Validation
6 *
7 * Copyright 2013 Zaefferer
8 * Released under the MIT license:
9 *   http://www.opensource.org/licenses/mit-license.php
10 */
11var sub_flg = false;
12(function($) {
13	$.extend($.fn, {
14		// http://docs.jquery.com/Plugins/Validation/validate
15		validate: function(options) {
16			// if nothing is selected, return nothing; can't chain anyway
17			if (!this.length) {
18				if (options && options.debug && window.console) {
19					console.warn("Nothing selected, can't validate, returning nothing.");
20				}
21				return;
22			}
23
24			// check if a validator for this form was already created
25			var validator = $.data(this[0], "validator");
26			if (validator) {
27				return validator;
28			}
29
30			// Add novalidate tag if HTML5.
31			this.attr("novalidate", "novalidate");
32
33			validator = new $.validator(options, this[0]);
34			$.data(this[0], "validator", validator);
35
36			if (validator.settings.onsubmit) {
37				this.validateDelegate(":submit", "click", function(event) {
38					if (validator.settings.submitHandler) {
39						validator.submitButton = event.target;
40					}
41					// allow suppressing validation by adding a cancel class to the submit button
42					if ($(event.target).hasClass("ab-cancel") || $(event.target).hasClass("cancel")) {
43						validator.cancelSubmit = true;
44					}
45
46					// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
47					if ($(event.target).attr("formnovalidate") !== undefined) {
48						validator.cancelSubmit = true;
49					}
50				});
51
52				// validate the form on submit
53				this.submit(function(event) {
54					if (validator.settings.debug) {
55						// prevent form submit to be able to see console output
56						event.preventDefault();
57					}
58					sub_flg = true;
59					function handle() {
60						var hidden;
61						if (validator.settings.submitHandler) {
62							if (validator.submitButton) {
63								// insert a hidden input as a replacement for the missing submit button
64								hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm);
65							}
66							validator.settings.submitHandler.call(validator, validator.currentForm, event);
67							if (validator.submitButton) {
68								// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
69								hidden.remove();
70							}
71
72							return false;
73						}
74
75						return true;
76					}
77
78					// prevent submit for invalid forms or custom submit handlers
79					if (validator.cancelSubmit) {
80						validator.cancelSubmit = false;
81						return handle();
82					}
83
84					if (validator.form()) {
85						if (validator.pendingRequest) {
86							validator.formSubmitted = true;
87							return false;
88						}
89						return handle();
90					} else {
91						validator.focusInvalid();
92						return false;
93					}
94				});
95			}
96
97			return validator;
98		},
99		// http://docs.jquery.com/Plugins/Validation/valid
100		valid: function() {
101			if ($(this[0]).is("form")) {
102				return this.validate().form();
103			} else if (typeof this[0] !== "undefined") {
104				var valid     = true;
105				var validator = $(this[0].form).validate();
106				this.each(function() {
107					valid = valid && validator.element(this);
108				});
109				return valid;
110			}
111		},
112		// attributes: space seperated list of attributes to retrieve and remove
113		removeAttrs: function(attributes) {
114			var result   = {},
115				$element = this;
116			$.each(attributes.split(/\s/), function(index, value) {
117				result[value] = $element.attr(value);
118				$element.removeAttr(value);
119			});
120			return result;
121		},
122		// http://docs.jquery.com/Plugins/Validation/rules
123		rules: function(command, argument) {
124			var element = this[0];
125			if (command) {
126				var settings      = $.data(element.form, "validator").settings;
127				var staticRules   = settings.rules;
128				var existingRules = $.validator.staticRules(element);
129				switch (command) {
130					case "add":
131						$.extend(existingRules, $.validator.normalizeRule(argument));
132						// remove messages from rules, but allow them to be set separetely
133						delete existingRules.messages;
134						staticRules[element.name] = existingRules;
135						if (argument.messages) {
136							settings.messages[element.name] = $.extend(settings.messages[element.name], argument.messages);
137						}
138						break;
139					case "remove":
140						if (!argument) {
141							delete staticRules[element.name];
142							return existingRules;
143						}
144						var filtered = {};
145						$.each(argument.split(/\s/), function(index, method) {
146							filtered[method] = existingRules[method];
147							delete existingRules[method];
148						});
149						return filtered;
150				}
151			}
152
153			var data = $.validator.normalizeRules(
154			$.extend(
155				{},
156				$.validator.classRules(element),
157				$.validator.attributeRules(element),
158				$.validator.dataRules(element),
159				$.validator.staticRules(element)
160			), element);
161
162			// make sure required is at front
163			if (data.required) {
164				var param = data.required;
165				delete data.required;
166				data = $.extend({required: param}, data);
167			}
168
169			return data;
170		}
171	});
172
173	// Custom selectors
174	$.extend($.expr[":"], {
175		// http://docs.jquery.com/Plugins/Validation/blank
176		blank: function(a) { return !$.trim("" + $(a).val()); },
177		// http://docs.jquery.com/Plugins/Validation/filled
178		filled: function(a) { return !!$.trim("" + $(a).val()); },
179		// http://docs.jquery.com/Plugins/Validation/unchecked
180		unchecked: function(a) { return !$(a).prop("checked"); }
181	});
182
183	// constructor for validator
184	$.validator = function(options, form) {
185		this.settings    = $.extend(true, {}, $.validator.defaults, options);
186		this.currentForm = form;
187		this.init();
188	};
189
190	$.validator.format = function(source, params) {
191		if (arguments.length === 1) {
192			return function() {
193				var args = $.makeArray(arguments);
194				args.unshift(source);
195				return $.validator.format.apply(this, args);
196			};
197		}
198		if (arguments.length > 2 && params.constructor !== Array ) {
199			params = $.makeArray(arguments).slice(1);
200		}
201		if (params.constructor !== Array) {
202			params = [ params ];
203		}
204		$.each(params, function(i, n) {
205			source = source.replace(new RegExp("\\{" + i + "\\}", "g"), function() {
206				return n;
207			});
208		});
209		return source;
210	};
211
212	$.extend($.validator, {
213		defaults: {
214			messages: {},
215			groups: {},
216			rules: {},
217			errorClass: "error",
218			validClass: "valid",
219			errorElement: "label",
220			focusInvalid: true,
221			errorContainer: $([]),
222			errorLabelContainer: $([]),
223			onsubmit: true,
224			ignore: ":hidden",
225			ignoreTitle: false,
226			start_flg: true,
227			onfocusin: function(element, event) {
228				this.lastActive = element;
229
230				// hide error label and remove error class on focus if enabled
231				if (this.settings.focusCleanup && !this.blockFocusCleanup) {
232					if (this.settings.unhighlight) {
233						this.settings.unhighlight.call(this, element, this.settings.errorClass, this.settings.validClass);
234					}
235					this.addWrapper(this.errorsFor(element)).hide();
236				}
237			},
238			onfocusout: function(element, event) {
239				if (!this.checkable(element) && (element.name in this.submitted || !this.optional(element))) {
240					this.element(element);
241				}
242			},
243			onkeyup: function(element, event) {
244				if (event.which === 9 && this.elementValue(element) === "") {
245					return;
246				} else if (element.name in this.submitted || element === this.lastElement) {
247					this.element(element);
248				}
249			},
250			onclick: function(element, event) {
251				// click on selects, radiobuttons and checkboxes
252				if (element.name in this.submitted) {
253					this.element(element);
254				}
255				// or option elements, check parent select in that case
256				else if (element.parentNode.name in this.submitted) {
257					this.element(element.parentNode);
258				}
259			},
260			highlight: function(element, errorClass, validClass) {
261				if (element.type === "radio") {
262					this.findByName(element.name).addClass(errorClass).removeClass(validClass);
263				} else {
264					$(element).addClass(errorClass).removeClass(validClass);
265				}
266			},
267			unhighlight: function(element, errorClass, validClass) {
268				if (element.type === "radio") {
269					this.findByName(element.name).removeClass(errorClass).addClass(validClass);
270				} else {
271					$(element).removeClass(errorClass).addClass(validClass);
272				}
273			}
274		},
275		// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
276		setDefaults: function(settings) {
277			$.extend($.validator.defaults, settings);
278		},
279		messages: {
280			required: "This field is required.",
281			remote: "Please fix this field.",
282			email: "Please enter a valid email address.",
283			url: "Please enter a valid URL.",
284			date: "Please enter a valid date.",
285			dateISO: "Please enter a valid date (ISO).",
286			number: "Please enter a valid number.",
287			digits: "Please enter only digits.",
288			creditcard: "Please enter a valid credit card number.",
289			equalTo: "Please enter the same value again.",
290			maxlength: $.validator.format("Please enter no more than {0} characters."),
291			minlength: $.validator.format("Please enter at least {0} characters."),
292			rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
293			range: $.validator.format("Please enter a value between {0} and {1}."),
294			max: $.validator.format("Please enter a value less than or equal to {0}."),
295			min: $.validator.format("Please enter a value greater than or equal to {0}."),
296
297			//dakeshita
298			thetaurl: "Please enter a valid RicohThetaURL.",
299
300			//dakeshita
301			multicheck: $.validator.format(myJsMsgAdmin[144]),
302
303			//kawanaka 禁則文字処理
304			reject : $.validator.format(myJsMsgAdmin[145]),
305
306			//matuuchi 数値のみ(小数点含まない)
307			numonly: myJsMsgAdmin[146],
308
309			//matuuchi 時刻
310			time: myJsMsgAdmin[147],
311
312			//dakeshita 時刻
313			datetime: myJsMsgAdmin[148],
314			view_datetime: myJsMsgAdmin[149],
315
316			//ichikawa tel 電話番号(- + を含む)
317			tel: myJsMsgAdmin[150],
318
319			//ichikawa postalcode 郵便番号(- を含む)
320			postalcode: myJsMsgAdmin[151],
321
322			//ichikawa alphanum 半角英数字(大文字/小文字)
323			alphanum: myJsMsgAdmin[152],
324
325			//ichikawa splitcnt カンマ区切り登録個数制限
326			splitcnt: $.validator.format(myJsMsgAdmin[153]),
327
328			//ichikawa splittextmax カンマ区切り内文字数上限
329			splittextmax: $.validator.format(myJsMsgAdmin[154]),
330
331			// kawanaka 問い合わせ設定>項目編集>リスト項目制限
332			textarearowmax: $.validator.format(myJsMsgAdmin[155]),
333			textareacolmax: $.validator.format(myJsMsgAdmin[156]),
334
335			// kawanaka 問い合わせ設定>項目編集>リスト項目制限>初期値
336			initialtotextarea: $.validator.format(myJsMsgAdmin[157]),
337
338			// kawanaka 問い合わせ設定>項目編集>リスト項目制限・必須
339			textarearequired: $.validator.format(myJsMsgAdmin[194]),
340
341			// kawanaka 小数点
342			numpoint: myJsMsgAdmin[192],
343
344			// kawanaka 半角文字
345			halfcharacter : $.validator.format(myJsMsgAdmin[198]),
346
347			// kondo SPページ設定>独自ルート名設定 半角英数字、記号(_か-)
348			routedir : myJsMsgAdmin[229],
349
350			// kondo SPページ設定>独自ルート名設定 既存ファイル名ユニークチェック
351			errorfiles : "この文字列は設定できません。",
352
353			// 半角英数字、記号
354			uname : myJsMsgAdmin[555],
355
356			//matuuchi google jobs 期間指定時
357			date_start_max : myJsMsgAdmin[253],
358
359			// 半角英数字、記号
360			close_user_id : myJsMsgAdmin[562],
361		},
362		autoCreateRanges: false,
363		prototype: {
364			init: function() {
365				this.labelContainer = $(this.settings.errorLabelContainer);
366				this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
367				this.containers = $(this.settings.errorContainer).add(this.settings.errorLabelContainer);
368				this.submitted = {};
369				this.valueCache = {};
370				this.pendingRequest = 0;
371				this.pending = {};
372				this.invalid = {};
373				this.reset();
374
375				var groups = (this.groups = {});
376				$.each(this.settings.groups, function(key, value) {
377					if (typeof value === "string") {
378						value = value.split(/\s/);
379					}
380					$.each(value, function(index, name) {
381						groups[name] = key;
382					});
383				});
384				var rules = this.settings.rules;
385				$.each(rules, function(key, value) {
386					rules[key] = $.validator.normalizeRule(value);
387				});
388
389				function delegate(event) {
390					var validator = $.data(this[0].form, "validator"),
391						eventType = "on" + event.type.replace(/^validate/, "");
392					if (validator.settings[eventType]) {
393						validator.settings[eventType].call(validator, this[0], event);
394					}
395				}
396				$(this.currentForm)
397					.validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
398						"[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
399						"[type='email'], [type='datetime'], [type='date'], [type='month'], " +
400						"[type='week'], [type='time'], [type='datetime-local'], " +
401						"[type='range'], [type='color'] ,[type='hidden']",
402						"focusin focusout keyup", delegate)
403					.validateDelegate("[type='radio'], [type='checkbox'], select, option, .a-valid", "click", delegate);
404
405				if (this.settings.invalidHandler) {
406					$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
407				}
408			},
409			// http://docs.jquery.com/Plugins/Validation/Validator/form
410			form: function() {
411				this.checkForm();
412				$.extend(this.submitted, this.errorMap);
413				this.invalid = $.extend({}, this.errorMap);
414				if (!this.valid()) {
415					$(this.currentForm).triggerHandler("invalid-form", [this]);
416				}
417
418				//dakeshita
419				this.settings.start_flg = false;
420
421				this.showErrors();
422				return this.valid();
423			},
424			checkForm: function() {
425				this.prepareForm();
426				for (var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++) {
427					this.check(elements[i]);
428				}
429				return this.valid();
430			},
431			// http://docs.jquery.com/Plugins/Validation/Validator/element
432			element: function(element) {
433				element = this.validationTargetFor(this.clean(element));
434				this.lastElement = element;
435				this.prepareElement(element);
436				this.currentElements = $(element);
437				var result = this.check(element) !== false;
438				if (result) {
439					delete this.invalid[element.name];
440				} else {
441					this.invalid[element.name] = true;
442				}
443				if (!this.numberOfInvalids()) {
444					// Hide error containers on last error
445					this.toHide = this.toHide.add(this.containers);
446				}
447				this.showErrors();
448				return result;
449			},
450			// http://docs.jquery.com/Plugins/Validation/Validator/showErrors
451			showErrors: function(errors) {
452				if (errors) {
453					// add items to error list and map
454					$.extend(this.errorMap, errors);
455					this.errorList = [];
456					for (var name in errors) {
457						this.errorList.push({
458							message: errors[name],
459							element: this.findByName(name)[0]
460						});
461					}
462					// remove items from success list
463					this.successList = $.grep(this.successList, function(element) {
464						return !(element.name in errors);
465					});
466				}
467
468				if (this.settings.showErrors) {
469					this.settings.showErrors.call(this, this.errorMap, this.errorList);
470					// 
471					if (typeof e_hide_flg !== 'undefined') {
472						if (e_hide_flg != "1" && sub_flg) this.defaultShowErrors();
473					}
474				} else {
475					this.defaultShowErrors();
476				}
477			},
478			// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
479			resetForm: function() {
480				if ($.fn.resetForm) {
481					$(this.currentForm).resetForm();
482				}
483				//
484				sub_flg = false;
485
486				this.submitted = {};
487				this.lastElement = null;
488				this.prepareForm();
489				this.hideErrors();
490				this.elements().removeClass(this.settings.errorClass).removeData("previousValue");
491			},
492			numberOfInvalids: function() {
493				return this.objectLength(this.invalid);
494			},
495			objectLength: function(obj) {
496				var count = 0;
497				for (var i in obj) {
498					count++;
499				}
500				return count;
501			},
502			hideErrors: function() {
503				this.addWrapper(this.toHide).hide();
504			},
505			valid: function() {
506				return this.size() === 0;
507			},
508			size: function() {
509				return this.errorList.length;
510			},
511			focusInvalid: function() {
512				if (this.settings.focusInvalid) {
513					try {
514                        var $inp_item = $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []);
515						
516						$inp_item.filter(":visible").focus().trigger("focusin");
517                        // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
518
519                        //2022/12/21 mizue 日付・時間の場合、focusしないので調整
520                        if($inp_item.attr("type") == 'hidden'){
521                            $inp_item.prev().children().focus();
522                        }
523
524						/* 20190508 tokuda 問い合わせページで必須項目に固
524定ヘッダーが被る件の修正 start */
525						var obj = document.getElementById("parts5");
526						var h = obj.clientHeight;
527						var ele = $(document.activeElement);
528						$("html,body").scrollTop(ele.offset().top-h-20);
529						/* 20190508 tokuda 問い合わせページで必須項目に固定ヘッダーが被る件の修正 end */
530
531					} catch(e) {
532						// ignore IE throwing errors when focusing hidden elements
533					}
534				}
535			},
536			findLastActive: function() {
537				var lastActive = this.lastActive;
538				return lastActive && $.grep(this.errorList, function(n) {
539					return n.element.name === lastActive.name;
540				}).length === 1 && lastActive;
541			},
542			elements: function() {
543				var validator = this,
544					rulesCache = {};
545
546				// select all valid inputs inside the form (no submit or reset buttons)
547				var valid_elem = $(this.currentForm)
548				//dakeshita
549				//.find("input, select, textarea, .a-valid")
550				.find(".a-valid")
551				.not(":submit, :reset, :image, [disabled]")
552				.not(this.settings.ignore)
553				.filter(function() {
554					$(this).uniqueId();
555					if(!this.name){
556						this.name = $(this).attr("id");
557						$(this).attr("name",this.name);
558					}
559
560					if (!this.name && validator.settings.debug && window.console) {
561						console.error("%o has no name assigned", this);
562					}
563
564					// select only the first element for each name, and only those with rules specified
565					if (this.name in rulesCache || !validator.objectLength($(this).rules())) {
566						return false;
567					}
568
569					rulesCache[this.name] = true;
570					return true;
571				});
572
573				return valid_elem;
574			},
575			clean: function(selector) {
576				return $(selector)[0];
577			},
578			errors: function() {
579				var errorClass = this.settings.errorClass.replace(" ", ".");
580				return $(this.settings.errorElement + "." + errorClass, this.errorContext);
581			},
582			reset: function() {
583				this.successList = [];
584				this.errorList = [];
585				this.errorMap = {};
586				this.toShow = $([]);
587				this.toHide = $([]);
588				this.currentElements = $([]);
589			},
590			prepareForm: function() {
591				this.reset();
592				this.toHide = this.errors().add(this.containers);
593			},
594			prepareElement: function(element) {
595				this.reset();
596				this.toHide = this.errorsFor(element);
597			},
598			elementValue: function(element) {
599				var type = $(element).attr("type"),
600					val = $(element).val();
601
602				if (type === "radio" || type === "checkbox") {
603					return $("input[name='" + $(element).attr("name") + "']:checked").val();
604				}
605
606				if (typeof val === "string") {
607					return val.replace(/\r/g, "");
608				}
609				return val;
610			},
611			check: function(element) {
612				element = this.validationTargetFor(this.clean(element));
613
614				var rules = $(element).rules();
615				var dependencyMismatch = false;
616				var val = this.elementValue(element);
617				var result;
618
619				for (var method in rules) {
620					var rule = { method: method, parameters: rules[method] };
621					try {
622
623						result = $.validator.methods[method].call(this, val, element, rule.parameters);
624						// if a method indicates that the field is optional and therefore valid,
625						// don't mark it as valid when there are no other rules
626						if (result === "dependency-mismatch") {
627							dependencyMismatch = true;
628							continue;
629						}
630						dependencyMismatch = false;
631
632						if (result === "pending") {
633							this.toHide = this.toHide.not(this.errorsFor(element));
634							return;
635						}
636
637						//dakeshita
638						if(this.settings.start_flg){
639							var message = this.defaultMessage(element, rule.method),
640								theregex = /\$?\{(\d+)\}/g;
641							if (typeof message === "function") {
642								message = message.call(this, rule.parameters, element);
643							} else if (theregex.test(message)) {
644								message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
645							}
646
647							this.submitted[element.name] = message;
648
649							if (!result) {
650								this.formatAndAdd(element, rule);
651								return false;
652							}
653						}else{
654							if (!result) {
655								this.formatAndAdd(element, rule);
656								return false;
657							}
658						}
659					} catch(e) {
660						if (this.settings.debug && window.console) {
661							console.log("Exception occurred when checking element " + element.i
661d + ", check the '" + rule.method + "' method.", e);
662						}
663						throw e;
664					}
665				}
666
667				if (dependencyMismatch) {
668					return;
669				}
670				if (this.objectLength(rules)) {
671					this.successList.push(element);
672				}
673
674				return true;
675			},
676			// return the custom message for the given element and validation method
677			// specified in the element's HTML5 data attribute
678			customDataMessage: function(element, method) {
679				return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));
680			},
681			// return the custom message for the given element name and validation method
682			customMessage: function(name, method) {
683				var m = this.settings.messages[name];
684				return m && (m.constructor === String ? m : m[method]);
685			},
686			// return the first defined argument, allowing empty strings
687			findDefined: function() {
688				for(var i = 0; i < arguments.length; i++) {
689					if (arguments[i] !== undefined) {
690						return arguments[i];
691					}
692				}
693				return undefined;
694			},
695			defaultMessage: function(element, method) {
696				return this.findDefined(
697					this.customMessage(element.name, method),
698					this.customDataMessage(element, method),
699					// title is never undefined, so handle empty string as undefined
700					!this.settings.ignoreTitle && element.title || undefined,
701					$.validator.messages[method],
702					"<strong>Warning: No message defined for " + element.name + "</strong>"
703				);
704			},
705			formatAndAdd: function(element, rule) {
706				var message = this.defaultMessage(element, rule.method),
707					theregex = /\$?\{(\d+)\}/g;
708				if (typeof message === "function") {
709					message = message.call(this, rule.parameters, element);
710				} else if (theregex.test(message)) {
711					message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
712				}
713				this.errorList.push({
714					message: message,
715					element: element,
716					method :rule.method,	//#3260 matuuchi
717				});
718
719				this.errorMap[element.name] = message;
720				this.submitted[element.name] = message;
721			},
722			addWrapper: function(toToggle) {
723				if (this.settings.wrapper) {
724					toToggle = toToggle.add(toToggle.parent(this.settings.wrapper));
725				}
726				return toToggle;
727			},
728			defaultShowErrors: function() {
729				var i, elements;
730				for (i = 0; this.errorList[i]; i++) {
731					var error = this.errorList[i];
732					if (this.settings.highlight) {
733						this.settings.highlight.call(this, error.element, this.settings.errorClass, this.settings.validClass);
734					}
735					this.showLabel(error.element, error.message);
736				}
737				if (this.errorList.length) {
738					this.toShow = this.toShow.add(this.containers);
739				}
740				if (this.settings.success) {
741					for (i = 0; this.successList[i]; i++) {
742						this.showLabel(this.successList[i]);
743					}
744				}
745				if (this.settings.unhighlight) {
746					for (i = 0, elements = this.validElements(); elements[i]; i++) {
747						this.settings.unhighlight.call(this, elements[i], this.settings.errorClass, this.settings.validClass);
748					}
749				}
750
751				//dakeshita チップの位置
752				$(this.toShow).each(function(){
753					$_this  = $(this);
754					$target = $_this.prev();
755
756					if(!$target || ($target.css("display") == "none") || ($target.attr("type") == "hidden")){
757						$target = $_this.parent();
758					}
759
760					tpos = $target.position();
761
762					if(tpos.top <= 1 && tpos.left <=1){
763						$child = $target.find("*:last-child");
764						if ($child.length) {
765							$target = $child;
766						}
767
768						if($target) tpos = $target.position();
769					}
770
771					if($target && tpos){
772						t = tpos.top + $target.height() + 15;
773						//l = tpos.left + $target.width();
774						//l = tpos.left + (($_this.outerWidth()/2)+5);
775						l = tpos.left + 5;
776						/*
777						$_this.css({'top':tpos.top,'left':0});
778						if($(window).width() < (l + $_this.outerWidth(true))){
779							l = l - ((l + $_this.outerWidth(true)) - $(window).width());
780						}
781						*/
782
783						$_this.css({'top':t,'left':l});
784
785						/*
786						t = tpos.top + $target.height() + 15;
787						if($target.parent().css("position") == "static"){
788							l = $(window).width() - (tpos.left + $target.width());
789						}else{
790							l = 0;
791						}
792						l = 0;
793
794						$_this.css({'top':t,'left':"auto",'right':l});
795						*/
796					}
797				});
798
799				this.toHide = this.toHide.not(this.toShow);
800				this.hideErrors();
801				this.addWrapper(this.toShow).show();
802			},
803			validElements: function() {
804				return this.currentElements.not(this.invalidElements());
805			},
806			invalidElements: function() {
807				return $(this.errorList).map(function() {
808					return this.element;
809				});
810			},
811			showLabel: function(element, message) {
812				var label = this.errorsFor(element);
813				if (label.length) {
814					// refresh error/success class
815					label.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
816					// replace message on existing label
817					label.html(message);
818				} else {
819					// create label
820					label = $("<" + this.settings.errorElement + ">")
821						.attr("for", this.idOrName(element))
822						.addClass(this.settings.errorClass)
823						.html(message || "");
824					if (this.settings.wrapper) {
825						// make sure the element is visible, even in IE
826						// actually showing the wrapped element is handled elsewhere
827						label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
828					}
829					if (!this.labelContainer.append(label).length) {
830						if (this.settings.errorPlacement) {
831							this.settings.errorPlacement(label, $(element));
832						}else {
833							label.insertAfter(element);
834						}
835					}
836				}
837				if (!message && this.settings.success) {
838					label.text("");
839					if (typeof this.settings.success === "string") {
840						label.addClass(this.settings.success);
841					} else {
842						this.settings.success(label, element);
843					}
844				}
845				this.toShow = this.toShow.add(label);
846			},
847			errorsFor: function(element) {
848				var name = this.idOrName(element);
849				return this.errors().filter(function() {
850					return $(this).attr("for") === name;
851				});
852			},
853			idOrName: function(element) {
854				return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
855			},
856			validationTargetFor: function(element) {
857				// if radio/checkbox, validate first element in group instead
858				if (this.checkable(element)) {
859					element = this.findByName(element.name).not(this.settings.ignore)[0];
860				}
861				return element;
862			},
863			checkable: function(element) {
864				return (/radio|checkbox/i).test(element.type);
865			},
866			findByName: function(name) {
867				return $(this.currentForm).find("[name='" + name + "']");
868			},
869			getLength: function(value, element) {
870				switch(element.nodeName.toLowerCase()) {
871				case "select":
872					return $("option:selected", element).length;
873				case "input":
874					if (this.checkable(element)) {
875						return this.findByName(element.name).filter(":checked").length;
876					}
877				}
878				return value.length;
879			},
880			depend: function(param, element) {
881				return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;
882			},
883			dependTypes: {
884				"boolean": function(param, element) {
885					return param;
886				},
887				"string": function(param, element) {
888					return !!$(param, element.form).length;
889				},
890				"function": function(param, element) {
891					return param(element);
892				}
893			},
894			optional: function(element) {
895				var val = this.elementValue(element);
896				return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";
897			},
898			startRequest: function(element) {
899				if (!this.pending[element.name]) {
900					this.pendingRequest++;
901					this.pending[element.name] = true;
902				}
903			},
904			stopRequest: function(element, valid) {
905				this.pendingRequest--;
906				// sometimes synchronization fails, make sure pendingRequest is never < 0
907				if (this.pendingRequest < 0) {
908					this.pendingRequest = 0;
909				}
910				delete this.pending[element.name];
911
912				if (valid && this.pendingRequest === 0 && this.formSubmitted && this.form()) {
913					$(this.currentForm).submit();
914					this.formSubmitted = false;
915				} else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {
916					$(this.currentForm).triggerHandler("invalid-form", [this]);
917					this.formSubmitted = false;
918				}
919			},
920			previousValue: function(element) {
921				return $.data(element, "previousValue") || $.data(element, "previousValue", {
922					old: null,
923					valid: true,
924					message: this.defaultMessage(element, "remote")
925				});
926			}
927		},
928		classRuleSettings: {
929			required: {required: true},
930			email: {email: true},
931			url: {url: true},
932			date: {date: true},
933			dateISO: {dateISO: true},
934			number: {number: true},
935			digits: {digits: true},
936			creditcard: {creditcard: true},
937
938			//dakeshita
939			thetaurl: {thetaurl: true},
940
941			//dakeshita
942			multicheck: {multicheck: true},
943
944			//kawanaka 禁則文字処理
945			reject: {reject: true},
946
947			//matuuchi 数値のみ(小数点含まない)
948			numonly: {numonly: true},
949
950			//matuuchi 時刻
951			time: {time: true},
952
953			//dakeshita
954			datetime: {datetime: true},
955			view_datetime: {view_datetime: true},
956
957			//ichikawa tel 電話番号(- + を含む)
958			tel: {tel: true},
959
960			//ichikawa postalcode 郵便番号(- を含む)
961			postalcode: {postalcode: true},
962
963			//ichikawa alphanum 半角英数字(大文字/小文字)
964			alphanum: {alphanum: true},
965
966			//ichikawa splitcnt カンマ区切り登録個数制限
967			splitcnt: {splitcnt: true},
968
969			//ichikawa splittextmax カンマ区切り内文字数上限
970			splittextmax: {splittextmax: true},
971
972			// kawanaka 問い合わせ設定>項目編集>リスト項目制限
973			textarearowmax: {textarearowmax: true},
974
975			// kawanaka 問い合わせ設定>項目編集>リスト項目制限
976			textareacolmax: {textareacolmax: true},
977
978			// kawanaka 問い合わせ設定>項目編集>リスト項目制限>初期値制限
979			initialtotextarea: {initialtotextarea: true},
980
981			// kawanaka 問い合わせ設定>項目編集>リスト項目制限・必須
982			textarearequired: {textarearequired: true},
983
984			//kawanaka 小数点
985			numpoint: {numpoint: true},
986
987			//kawanaka 半角文字
988			halfcharacter: {halfcharacter: true},
989
990			//kondo 半角英数字か記号(_か-)
991			routedir: {routedir: true},
992
993			//kondo SPページ設定>独自ルート名設定 既存ファイル名ユニークチェック
994			errorfiles : {errorfiles: true},
995
996			// ユーザ設定 半角英数字、記号
997			uname : {uname: true},
998
999			//matuuchi 求人ブロック 対象日付からいつまでã
999‹
1000			date_start_max : {date_start_max :true},
1001
1002			//matuuchi 半角英数字、記号 限定公開 ユーザーID
1003			close_user_id : {close_user_id :true},
1004
1005		},
1006		addClassRules: function(className, rules) {
1007			if (className.constructor === String) {
1008				this.classRuleSettings[className] = rules;
1009			} else {
1010				$.extend(this.classRuleSettings, className);
1011			}
1012		},
1013		classRules: function(element) {
1014			var rules = {};
1015			var classes = $(element).attr("class");
1016			if (classes) {
1017				$.each(classes.split(" "), function() {
1018					if (this in $.validator.classRuleSettings) {
1019						$.extend(rules, $.validator.classRuleSettings[this]);
1020					}
1021				});
1022			}
1023			return rules;
1024		},
1025		attributeRules: function(element) {
1026			var rules = {};
1027			var $element = $(element);
1028			var type = $element[0].getAttribute("type");
1029
1030			for (var method in $.validator.methods) {
1031				var value;
1032
1033				// support for <input required> in both html5 and older browsers
1034				if (method === "required") {
1035					value = $element.get(0).getAttribute(method);
1036					// Some browsers return an empty string for the required attribute
1037					// and non-HTML5 browsers might have required="" markup
1038					if (value === "") {
1039						value = true;
1040					}
1041					// force non-HTML5 browsers to return bool
1042					value = !!value;
1043				} else {
1044					value = $element.attr(method);
1045				}
1046
1047				// convert the value to a number for number inputs, and for text for backwards compability
1048				// allows type="date" and others to be compared as strings
1049				if (/min|max/.test(method) && (type === null || /number|range|text/.test(type))) {
1050					value = Number(value);
1051				}
1052
1053				if (value) {
1054					rules[method] = value;
1055				//dakeshita typeがurlの場合はルールにいれない
1056				} else if (type === method && type !== 'range'  && type !== 'url' && type !== 'tel') {
1057					// exception: the jquery validate 'range' method
1058					// does not test for the html5 'range' type
1059					rules[method] = true;
1060				}
1061			}
1062
1063			// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
1064			if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
1065				delete rules.maxlength;
1066			}
1067
1068			return rules;
1069		},
1070		dataRules: function(element) {
1071			var method, value,
1072				rules = {}, $element = $(element);
1073			for (method in $.validator.methods) {
1074				value = $element.data("rule-" + method.toLowerCase());
1075				// if(method.toLowerCase() == "maxlength" && $('html').attr('lang') == 'en'){
1076				if(typeof(gp_now) != "undefined"){
1077					if(method.toLowerCase() == "maxlength" && gp_now == "JE"){
1078						if((value <= 127 && value >= 10) || value >= 256){
1079							value *= 2;
1080						}
1081					}
1082				}
1083				if (value !== undefined) {
1084					rules[method] = value;
1085				}
1086			}
1087			return rules;
1088		},
1089		staticRules: function(element) {
1090			var rules = {};
1091
1092			//dakeshita
1093			if(!element.form){
1094				element.form = $(element).closest("form").get(0);
1095			}
1096
1097			var validator = $.data(element.form, "validator");
1098			if (validator.settings.rules) {
1099				rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
1100			}
1101			return rules;
1102		},
1103		normalizeRules: function(rules, element) {
1104			// handle dependency check
1105			$.each(rules, function(prop, val) {
1106				// ignore rule when param is explicitly false, eg. required:false
1107				if (val === false) {
1108					delete rules[prop];
1109					return;
1110				}
1111				if (val.param || val.depends) {
1112					var keepRule = true;
1113					switch (typeof val.depends) {
1114					case "string":
1115						keepRule = !!$(val.depends, element.form).length;
1116						break;
1117					case "function":
1118						keepRule = val.depends.call(element, element);
1119						break;
1120					}
1121					if (keepRule) {
1122						rules[prop] = val.param !== undefined ? val.param : true;
1123					} else {
1124						delete rules[prop];
1125					}
1126				}
1127			});
1128
1129			// evaluate parameters
1130			$.each(rules, function(rule, parameter) {
1131				rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
1132			});
1133
1134			// clean number parameters
1135			$.each(['minlength', 'maxlength'], function() {
1136				if (rules[this]) {
1137					rules[this] = Number(rules[this]);
1138
1139					if(this == "maxlength" && SiteLang == "en" && rules[this] != "255"){
1140						rules[this] = rules[this]*2;
1141					}
1142				}
1143			});
1144			$.each(['rangelength', 'range'], function() {
1145				var parts;
1146				if (rules[this]) {
1147					if ($.isArray(rules[this])) {
1148						rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
1149					} else if (typeof rules[this] === "string") {
1150						parts = rules[this].split(/[\s,]+/);
1151						rules[this] = [Number(parts[0]), Number(parts[1])];
1152					}
1153				}
1154			});
1155
1156			if ($.validator.autoCreateRanges) {
1157				// auto-create ranges
1158				if (rules.min && rules.max) {
1159					rules.range = [rules.min, rules.max];
1160					delete rules.min;
1161					delete rules.max;
1162				}
1163				if (rules.minlength && rules.maxlength) {
1164					rules.rangelength = [rules.minlength, rules.maxlength];
1165					delete rules.minlength;
1166					delete rules.maxlength;
1167				}
1168			}
1169
1170			return rules;
1171		},
vendor: 4,354 bytes, lines 1172-1230
1172		// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
1173		normalizeRule: function(data) {
1174			if (typeof data === "string") {
1175				var transformed = {};
1176				$.each(data.split(/\s/), function() {
1177					transformed[this] = true;
1178				});
1179				data = transformed;
1180			}
1181			return data;
1182		},
1183		// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
1184		addMethod: function(name, method, message) {
1185			$.validator.methods[name] = method;
1186			$.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];
1187			if (method.length < 3) {
1188				$.validator.addClassRules(name, $.validator.normalizeRule(name));
1189			}
1190		},
1191		methods: {
1192			// http://docs.jquery.com/Plugins/Validation/Methods/required
1193			required: function(value, element, param) {
1194				// check if dependency is met
1195				if (!this.depend(param, element)) {
1196					return "dependency-mismatch";
1197				}
1198				if (element.nodeName.toLowerCase() === "select") {
1199					// could be an array for select-multiple or a string, both are fine this way
1200					var val = $(element).val();
1201					return val && val.length > 0;
1202				}
1203				if (this.checkable(element)) {
1204					return this.getLength(value, element) > 0;
1205				}
1206				return $.trim(value).length > 0;
1207			},
1208			// http://docs.jquery.com/Plugins/Validation/Methods/email
1209			email: function(value, element) {
1210				// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
1211				return this.optional(element) || /^((([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(value);
1212			},
1213			// http://docs.jquery.com/Plugins/Validation/Methods/url
1214			url: function(value, element) {
1215				if(value.match(/^\|/)){
1216					return true;
1217				}
1218				// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
1219				//#4881
1220				return this.optional(element) || /^((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(value);
1221			},
1222			// http://docs.jquery.com/Plugins/Validation/Methods/date
1223			thetaurl: function(value, element) {
1224				//if(!value)return false;
1225
1226				//theta360.biz調整
1227				if(value.match(/^(https:\/\/)([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)(theta360.biz\/)([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/)){
1228					return true;
1229				}
1230				return this.optional(element) || value.match(/^(https:\/\/theta360.
1230com\/)([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/);
1231			},
1232			// http://docs.jquery.com/Plugins/Validation/Methods/date
1233			date: function(value, element) {
1234				return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());
1235			},
1236
1237			// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
1238			dateISO: function(value, element) {
1239				return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
1240			},
1241			// http://docs.jquery.com/Plugins/Validation/Methods/number
1242			number: function(value, element) {
1243
1244				//t-ichikawa フロート型の場合-のみもはじく
1245				if(value == "-"){
1246					return false;
1247				}
1248				return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
1249			},
1250			// http://docs.jquery.com/Plugins/Validation/Methods/digits
1251			digits: function(value, element) {
1252				return this.optional(element) || /^\d+$/.test(value);
1253			},
1254			// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
1255			// based on http://en.wikipedia.org/wiki/Luhn
1256			creditcard: function(value, element) {
1257				if (this.optional(element)) {
1258					return "dependency-mismatch";
1259				}
1260				// accept only spaces, digits and dashes
1261				if (/[^0-9 \-]+/.test(value)) {
1262					return false;
1263				}
1264				var nCheck = 0,
1265					nDigit = 0,
1266					bEven = false;
1267
1268				value = value.replace(/\D/g, "");
1269
1270				for (var n = value.length - 1; n >= 0; n--) {
1271					var cDigit = value.charAt(n);
1272					nDigit = parseInt(cDigit, 10);
1273					if (bEven) {
1274						if ((nDigit *= 2) > 9) {
1275							nDigit -= 9;
1276						}
1277					}
1278					nCheck += nDigit;
1279					bEven = !bEven;
1280				}
1281
1282				return (nCheck % 10) === 0;
1283			},
1284			// http://docs.jquery.com/Plugins/Validation/Methods/minlength
1285			minlength: function(value, element, param) {
1286				var length = $.isArray(value) ? value.length : this.getLength($.trim(value), element);
1287				return this.optional(element) || length >= param;
1288			},
1289			// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
1290			maxlength: function(value, element, param) {
1291				var length = $.isArray(value) ? value.length : this.getLength($.trim(value), element);
1292				return this.optional(element) || length <= param;
1293			},
1294			// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
1295			rangelength: function(value, element, param) {
1296				var length = $.isArray(value) ? value.length : this.getLength($.trim(value), element);
1297				return this.optional(element) || (length >= param[0] && length <= param[1]);
1298			},
1299			// http://docs.jquery.com/Plugins/Validation/Methods/min
1300			min: function(value, element, param) {
1301				return this.optional(element) || value >= param;
1302			},
1303			// http://docs.jquery.com/Plugins/Validation/Methods/max
1304			max: function(value, element, param) {
1305				return this.optional(element) || value <= param;
1306			},
1307			// http://docs.jquery.com/Plugins/Validation/Methods/range
1308			range: function(value, element, param) {
1309				return this.optional(element) || (value >= param[0] && value <= param[1]);
1310			},
1311			// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
1312			equalTo: function(value, element, param) {
1313				// bind to the blur event of the target in order to revalidate whenever the target field is updated
1314				// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
1315				var target = $(param);
1316				if (this.settings.onfocusout) {
1317					target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
1318						$(element).valid();
1319					});
1320				}
1321				return value === target.val();
1322			},
1323			// http://docs.jquery.com/Plugins/Validation/Methods/remote
1324			remote: function(value, element, param) {
1325				if (this.optional(element)) {
1326					return "dependency-mismatch";
1327				}
1328
1329				var previous = this.previousValue(element);
1330				if (!this.settings.messages[element.name]) {
1331					this.settings.messages[element.name] = {};
1332				}
1333				previous.originalMessage = this.settings.messages[element.name].remote;
1334				this.settings.messages[element.name].remote = previous.message;
1335
1336				param = typeof param === "string" && {url:param} || param;
1337
1338				if (previous.old === value) {
1339					return previous.valid;
1340				}
1341
1342				previous.old = value;
1343				var validator = this;
1344				this.startRequest(element);
1345				var data = {};
1346				data[element.name] = value;
1347				$.ajax($.extend(true, {
1348					url: param,
1349					mode: "abort",
1350					port: "validate" + element.name,
1351					dataType: "json",
1352					data: data,
1353					success: function(response) {
1354						validator.settings.messages[element.name].remote = previous.originalMessage;
1355						var valid = response === true || response === "true";
1356						if (valid) {
1357							var submitted = validator.formSubmitted;
1358							validator.prepareElement(element);
1359							validator.formSubmitted = submitted;
1360							validator.successList.push(element);
1361							delete validator.invalid[element.name];
1362							validator.showErrors();
1363						} else {
1364							var errors = {};
1365							var message = response || validator.defaultMessage(element, "remote");
1366							errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
1367							validator.invalid[element.name] = true;
1368							validator.showErrors(errors);
1369						}
1370						previous.valid = valid;
1371						validator.stopRequest(element, valid);
1372					}
1373				}, param));
1374				return "pending";
1375			},
1376			//dakeshita
1377			//複数チェックボックス、チェックボックスの親要素に指定
1378			multicheck: function(value, element, param) {
1379				return $("input:checked",$(element)).length>0;
1380			},
1381			//kawanaka 禁則文字処理
1382			reject:function(value, element, param) {
1383				return (value.indexOf(param) === -1);
1384			},
1385			//matuuchi 数値のみ(小数点等含まない)
1386			numonly: function(value, element, param) {
1387				return this.optional(element) || /^\d*$/.test(value);
1388			},
1389
1390			//matuuchi 時刻チェック
1391			time: function(value, element, param) {
1392				return this.optional(element) || /^([01]?[0-9]|2[0-3]):(([0-5][0-9])|([0-5][0-9]):([0-5][0-9]))$/.test(value);
1393			},
1394			//dakeshita 日時チェック
1395			datetime: function(value, element) {
1396				if(!this.optional(element)){
1397					params = value.split(' ');
1398					if(params.length == 2){
1399						if(!/Invalid|NaN/.test(new Date(params[0]).toString())){
1400							if(/^([01]?[0-9]|2[0-3]):(([0-5][0-9])|([0-5][0-9]):([0-5][0-9]))$/.test(params[1])){
1401								return true;
1402							}
1403						}
1404					}
1405				}
1406				return false;
1407			},
1408			view_datetime: function(value, element) {
1409				if(!this.optional(element)){
1410					params = value.split(' ');
1411					if(params.length == 2){
1412						if(!/Invalid|NaN/.test(new Date(params[0]).toString())){
1413							if(/^([01]?[0-9]|2[0-3]):(([0-5][0-9])|([0-5][0-9]):([0-5][0-9]))$/.test(params[1])){
1414
1415								//入力された日付から30分以上ならOK
1416								date1 = value+":00";
1417								date1 = date1.replace(/[Â¥-]/g,"/");
1418								console.log(date1);
1419
1420								//とりあえず1時間(正確には59分)
1421								var time1 = Math.floor(new Date(date1).getTime());
1422								var time2 = Math.floor((parseInt(smarty_now)+3540)*1000);
1423
1424								var d1 = new Date(time1);
1425								var d2 = new Date(time2);
1426
1427								if(time2 < time1){
1428									return true;
1429								}
1430							}
1431						}
1432					}
1433				}
1434				return false;
1435			},
1436			//ichikawa tel 電話番号(- + を含む)
1437			tel: function(value, element) {
1438				//t-ichikawa - + のみはじく
1439				if(value == "-" || value == "+"){
1440					return false;
1441				}
1442
1443				return this.optional(element) || /^(([0-9-])|([0+9+]))+$/.test(value);
1444			},
1445			//ichikawa postalcode 郵便番号(- を含む)
1446			postalcode: function(value, element) {
1447				//t-ichikawa - + のみはじく
1448				if(value == "-"){
1449					return false;
1450				}
1451				return this.optional(element) || /^\d{3}\-\d{4}$/.test(value);
1452			},
1453			//ichikawa alphanum 半角英数字(大文字/小文字)
1454			alphanum: function(value, element) {
1455				return this.optional(element) || /^([a-zA-Z0-9]+)$/.test(value);
1456			},
1457			//ichikawa splitcnt カンマ区切り登録個数制限
1458			splitcnt: function(value, element, param) {
1459				//if(!this.optional(element)){
1460				paramsArray = value.split(',');
1461				return this.optional(element) || paramsArray.length <= param;
1462			},
1463			//ichikawa splittextmax カンマ区切り内文字数上限
1464			splittextmax: function(value, element, param) {
1465				//if(!this.optional(element)){
1466				paramsArray = value.split(',');
1467				for(var i=0 ; i<paramsArray.length ; i++) {
1468					if(paramsArray[i].length >= param){
1469						return false;
1470					}
1471				}
1472				return true;
1473			},
1474			// kawanaka 問い合わせ設定>項目編集>リスト項目制限
1475			textarearowmax: function(value, element, param) {
1476				var lineArray = value.split("\n");
1477
1478				for(var i=0, max = lineArray.length; i < max; i++) {
1479
1480					if(lineArray[i].length > parseInt(param, 10)) {
1481						return this.optional(element) || false;
1482					}
1483				}
1484
1485				return this.optional(element) || true;
1486			},
1487			// kawanaka 問い合わせ設定>項目編集>リスト項目制限
1488			textareacolmax: function(value, element, param) {
1489				var lineArray = value.split("\n");
1490
1491				return this.optional(element) || (lineArray.length <= parseInt(param, 10));
1492			},
1493			// kawanaka 問い合わせ設定>項目編集>リスト項目制限>初期値制限
1494			initialtotextarea: function(value, element, param) {
1495				var $elm = $(element);
1496
1497				var textarea_id = $elm.data("textarea-id");
1498
1499				var $textarea = $("#" + textarea_id);
1500
1501				var elementLineArray  = value.split("\n");
1502				var textareaLineArray = $textarea.val().split("\n");
1503
1504				for(var ELi = 0, ELmax = elementLineArray.length; ELi < ELmax; ELi++) {
1505					var match_flg = false;
1506
1507					for(var TXi = 0, TXmax = textareaLineArray.length; TXi < TXmax; TXi++) {
1508						if(elementLineArray[ELi] == textareaLineArray[TXi]) {
1509							match_flg = true;
1510							break;
1511						}
1512					}
1513
1514					if(match_flg === false) {
1515						return this.optional(element) || false;
1516					}
1517				}
1518				return this.optional(element) || true;
1519			},
1520			// kawanaka 問い合わせ設定>項目編集>リスト項目制限
1521			textarearequired: function(value, element, param) {
1522				var lineArray = value.split("\n");
1523
1524				for(var i=0, max = lineArray.length; i < max; i++) {
1525					if(lineArray[i].length < 1) {
1526						return this.optional(element) || false;
1527					}
1528				}
1529
1530				return this.optional(element) || true;
1531			},
1532			//kawanaka 小数点 `param`は「全体の桁数,小数点の桁数」で指定(MySQLのdouble型の指定に準拠)
1533			numpoint:function(value, element, param) {
1534				if(value.match(/^([1-9]\d*|0)(\.\d+)?$/) === null) {
1535					$.validator.messages["numpoint"] = myJsMsgAdmin[192];
1536
1537					return this.optional(element) || false;
1538				} else {
1539					var limit = param.split(',');
1540
1541					var limit_keta   = (typeof limit[0] !== "undefined") ? parseInt(limit[0], 10) : 999;
1542					var limit_syousu = (typeof limit[1] !== "undefined") ? parseInt(limit[1], 10) : 999;
1543					var limit_seisu  = limit_keta - limit_syousu;
1544
1545					var division = value.split('.');
1546					var seisu    = (typeof division[0] !== "undefined") ? division[0] : "";
1547					var syousu   = (typeof division[1] !== "undefined") ? division[1] : "";
1548
1549					if((seisu.length > limit_seisu) || (syousu.length > limit_syousu)) {
1550						$.validator.messages["numpoint"] = myJsMsgReplace(myJsMsgAdmin[193], [limit_seisu, limit_syousu]);
1551
1552						return this.optional(element) || false;
1553					}
1554				}
1555
1556				return this.optional(element) || true;
1557			},
1558			//kawanaka 半角文字
1559			halfcharacter:function(value, element, param) {
1560				return this.optional(element) || (value.match(/^[ -~]+$/) !== null);
1561			},
1562			//kondo 半角英数字か記号(_-)
1563			routedir:function(value, element, param){
1564				return this.optional(element) || (value.match(/^(([a-z0-9][a-z0-9_-]+[a-z0-9])|([a-z0-9]+))$/) !== null);
1565			},
1566			//kondo SPページ設定>独自ルート名設定 既存ファイル名ユニークチェック
1567			errorfiles:function(value, element){
1568				var $elm = $(element);
1569
1570				var error_files = $elm.data("error-files");
1571
1572				var split = error_files.split(',');
1573
1574				for(var i=0, max = split.length; i < max; i++){
1575					var match_flg = false;
1576
1577					if(split[i] == value){
1578
1579						match_flg = true;
1580						return this.optional(element) || false;
1581					}
1582				}
1583
1584				return this.optional(element) || true;
1585			},
1586			uname	: function(value, element, param) {
1587				return this.optional(element) || (value.match(/^(([a-zA-Z0-9][\.\%\@a-zA-Z0-9_-]+[a-zA-Z0-9])|([a-zA-Z0-9]+))$/) !== null);
1588			},
1589			//matuuchi google job
1590			date_start_max:function(value, element){
1591				if(!this.optional(element)){
1592
1593					var start_date = "";
1594					var max_date = [];
1595					if(typeof element.getAttribute("data-start-date") !== 'undefined') {
1596						start_date = element.getAttribute("data-start-date");
1597					}
1598
1599					if(typeof element.getAttribute("data-start-date") !== 'undefined') {
1600						var start_max = element.getAttribute("data-date-max");
1601
1602						max_date = start_max.split('-');
1603					}
1604
1605	 				//要素足りない、、、一旦スルー
1606					if(start_date === 'undefined' || max_date === 'undefined') return true;
1607
1608					start = start_date.split('-');
1609					var min = new Date(start[0], start[1], start[2]);
1610					var max = new Date(start[0], start[1], start[2]);
1611					var val = new Date(value);
1612					var unit = myJsMsgAdmin[254]; //å¹´
1613					//他いい感じに調整してくれーとりあえず年単位だけ
1614					if(max_date[1] == "year"){
1615						var tmp = parseInt(start[0],10) + parseInt(max_date[0],10);
1616						max = new Date(tmp, start[1], start[2]);
1617					}
1618
1619					if(val > max){
1620						$.validator.messages["date_start_max"] = myJsMsgReplace(myJsMsgAdmin[253], [max_date[0]+unit]);
1621						return false;
1622					}
1623					// if(params.length == 2){
1624					// 	if(!/Invalid|NaN/.test(new Date(params[0]).toString())){
1625					// 			//$.validator.messages["date_start_max"] = myJsMsgReplace(myJsMsgAdmin[253], [limit_seisu, limit_syousu]);
1626					// 	}
1627					// }
1628				}
1629				return true;
1630			},
1631			close_user_id: function(value, element, param) {
1632				return this.optional(element) || /^([a-zA-Z0-9_\-\.\@\%]+)$/.test(value);
1633			},
1634		}
1635	});
1636
1637	// deprecated, use $.validator.format instead
1638	$.format = $.validator.format;
1639}(jQuery));
1640
1641// ajax mode: abort
1642// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
1643// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
1644(function($) {
1645	var pendingRequests = {};
1646	// Use a prefilter if available (1.5+)
1647	if ($.ajaxPrefilter) {
1648		$.ajaxPrefilter(function(settings, _, xhr) {
1649			var port = settings.port;
1650			if (settings.mode === "abort") {
1651				if (pendingRequests[port]) {
1652					pendingRequests[port].abort();
1653				}
1654				pendingRequests[port] = xhr;
1655			}
1656		});
1657	} else {
1658		// Proxy ajax
1659		var ajax = $.ajax;
1660		$.ajax = function(settings) {
1661			var mode = ("mode" in settings ? settings : $.ajaxSettings).mode,
1662				port = ("port" in settings ? settings : $.ajaxSettings).port;
1663			if (mode === "abort") {
1664				if (pendingRequests[port]) {
1665					pendingRequests[port].abort();
1666				}
1667				pendingRequests[port] = ajax.apply(this, arguments);
1668				return pendingRequests[port];
1669			}
1670			return ajax.apply(this, arguments);
1671		};
1672	}
1673}(jQuery));
1674
1675// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
1676// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
1677(function($) {
1678	$.extend($.fn, {
1679		validateDelegate: function(delegate, type, handler) {
1680			return this.bind(type, function(event) {
1681				var target = $(event.target);
1682
1683				//dakeshita
1684				if(target.parent().hasClass("a-valid")){
1685					target = target.parent();
1686				}
1687
1688				if (target.is(delegate)) {
1689					return handler.apply(target, arguments);
1690				}
1691			});
1692		}
1693	});
1694}(jQuery));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.