Вход Регистрация
Файл: js/jquery.validate.min.js
Строк: 1029
<?php
/**
 * jQuery Validation Plugin 1.9.0
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2011 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function (c) {
    
c.extend(c.fn, {
        
validate: function (a) {
            if (
this.length) {
                var 
c.data(this[0], "validator");
                if (
b)return b;
                
this.attr("novalidate""novalidate");
                
= new c.validator(athis[0]);
                
c.data(this[0], "validator"b);
                if (
b.settings.onsubmit) {
                    
this.find("input, button");
                    
a.filter(".cancel").click(function () {
                        
b.cancelSubmit true
                    
});
                    
b.settings.submitHandler && a.filter(":submit").click(function () {
                        
b.submitButton this
                    
});
                    
this.submit(function (d) {
                        function 
e() {
                            if (
b.settings.submitHandler) {
                                if (
b.submitButton)var c("<input type='hidden'/>").attr("name",
                                    
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);
                                
b.settings.submitHandler.call(bb.currentForm);
                                
b.submitButton && f.remove();
                                return 
false
                            
}
                            return 
true
                        
}

                        
b.settings.debug && d.preventDefault();
                        if (
b.cancelSubmit) {
                            
b.cancelSubmit false;
                            return 
e()
                        }
                        if (
b.form()) {
                            if (
b.pendingRequest) {
                                
b.formSubmitted true;
                                return 
false
                            
}
                            return 
e()
                        } else {
                            
b.focusInvalid();
                            return 
false
                        
}
                    })
                }
                return 
b
            
} else && a.debug && window.console && console.warn("nothing selected, can't validate, returning nothing")
        }, 
valid: function () {
            if (
c(this[0]).is("form"))return this.validate().form();
            else {
                var 
truec(this[0].form).validate();
                
this.each(function () {
                    
&= b.element(this)
                });
                return 
a
            
}
        }, 
removeAttrs: function (a) {
            var 
= {}, this;
            
c.each(a.split(/s/), function (ef) {
                
b[f] = d.attr(f);
                
d.removeAttr(f)
            });
            return 
b
        
}, rules: function (ab) {
            var 
this[0];
            if (
a) {
                var 
c.data(d.form"validator").settingse.rulesc.validator.staticRules(d);
                switch (
a) {
                    case 
"add":
                        
c.extend(gc.validator.normalizeRule(b));
                        
f[d.name] = g;
                        if (
b.messages)e.messages[d.name] = c.extend(e.messages[d.name], b.messages);
                        break;
                    case 
"remove":
                        if (!
b) {
                            
delete f[d.name];
                            return 
g
                        
}
                        var 
= {};
                        
c.each(b.split(/s/), function (ji) {
                            
h[i] = g[i];
                            
delete g[i]
                        });
                        return 
h
                
}
            }
            
c.validator.normalizeRules(c.extend({}, c.validator.metadataRules(d), c.validator.classRules(d), c.validator.attributeRules(d), c.validator.staticRules(d)), d);
            if (
d.required) {
                
d.required;
                
delete d.required;
                
c.extend({requirede}, d)
            }
            return 
d
        
}
    });
    
c.extend(c.expr[":"], {
        
blank: function (a) {
            return !
c.trim("" a.value)
        }, 
filled: function (a) {
            return !!
c.trim("" a.value)
        }, 
unchecked: function (a) {
            return !
a.checked
        
}
    });
    
c.validator = function (a,
                            
b) {
        
this.settings c.extend(true, {}, c.validator.defaultsa);
        
this.currentForm b;
        
this.init()
    };
    
c.validator.format = function (ab) {
        if (
arguments.length == 1)return function () {
            var 
c.makeArray(arguments);
            
d.unshift(a);
            return 
c.validator.format.apply(thisd)
        };
        if (
arguments.length && b.constructor != Array)c.makeArray(arguments).slice(1);
        if (
b.constructor != Array)= [b];
        
c.each(b, function (de) {
            
a.replace(RegExp("\{" "\}""g"), e)
        });
        return 
a
    
};
    
c.extend(c.validator, {
        
defaults: {
            
messages: {},
            
groups: {},
            
rules: {},
            
errorClass"error",
            
validClass"valid",
            
errorElement"label",
            
focusInvalidtrue,
            
errorContainerc([]),
            
errorLabelContainerc([]),
            
onsubmittrue,
            
ignore":hidden",
            
ignoreTitlefalse,
            
onfocusin: function (a) {
                
this.lastActive a;
                if (
this.settings.focusCleanup && !this.blockFocusCleanup) {
                    
this.settings.unhighlight && this.settings.unhighlight.call(thisathis.settings.errorClassthis.settings.validClass);
                    
this.addWrapper(this.errorsFor(a)).hide()
                }
            },
            
onfocusout: function (a) {
                if (!
this.checkable(a) && (a.name in this.submitted || !this.optional(a)))this.element(a)
            },
            
onkeyup: function (a) {
                if (
a.name in this.submitted || == this.lastElement)this.element(a)
            },
            
onclick: function (a) {
                if (
a.name in this.submitted)this.element(a); else a.parentNode.name in this.submitted && this.element(a.parentNode)
            },
            
highlight: function (abd) {
                
a.type === "radio" this.findByName(a.name).addClass(b).removeClass(d) : c(a).addClass(b).removeClass(d)
            },
            
unhighlight: function (abd) {
                
a.type === "radio" this.findByName(a.name).removeClass(b).addClass(d) : c(a).removeClass(b).addClass(d)
            }
        },
        
setDefaults: function (a) {
            
c.extend(c.validator.defaults,
                
a)
        },
        
messages: {
            
required"This field is required.",
            
remote"Please fix this field.",
            
email"Введите рабочий email",
            
company"Введите наименование компании",
            
url"Please enter a valid URL.",
            
date"Please enter a valid date.",
            
dateISO"Please enter a valid date (ISO).",
            
number"Введите только цифры",
            
digits"Please enter only digits.",
            
creditcard"Please enter a valid credit card number.",
            
equalTo"Please enter the same value again.",
            
accept"Please enter a value with a valid extension.",
            
maxlengthc.validator.format("Please enter no more than {0} characters."),
            
minlengthc.validator.format("Please enter at least {0} characters."),
            
rangelengthc.validator.format("Please enter a value between {0} and {1} characters long."),
            
rangec.validator.format("Please enter a value between {0} and {1}."),
            
maxc.validator.format("Please enter a value less than or equal to {0}."),
            
minc.validator.format("Please enter a value greater than or equal to {0}.")
        },
        
autoCreateRangesfalse,
        
prototype: {
            
init: function () {
                function 
a(e) {
                    var 
c.data(this[0].form"validator"), "on" e.type.replace(/^validate/,
                            
"");
                    
f.settings[g] && f.settings[g].call(fthis[0], e)
                }

                
this.labelContainer c(this.settings.errorLabelContainer);
                
this.errorContext this.labelContainer.length && this.labelContainer || c(this.currentForm);
                
this.containers c(this.settings.errorContainer).add(this.settings.errorLabelContainer);
                
this.submitted = {};
                
this.valueCache = {};
                
this.pendingRequest 0;
                
this.pending = {};
                
this.invalid = {};
                
this.reset();
                var 
this.groups = {};
                
c.each(this.settings.groups, function (ef) {
                    
c.each(f.split(/s/), function (gh) {
                        
b[h] = e
                    
})
                });
                var 
=
                    
this.settings.rules;
                
c.each(d, function (ef) {
                    
d[e] = c.validator.normalizeRule(f)
                });
                
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",
                    
a);
                
this.settings.invalidHandler && c(this.currentForm).bind("invalid-form.validate"this.settings.invalidHandler)
            }, 
form: function () {
                
this.checkForm();
                
c.extend(this.submittedthis.errorMap);
                
this.invalid c.extend({}, this.errorMap);
                
this.valid() || c(this.currentForm).triggerHandler("invalid-form", [this]);
                
this.showErrors();
                return 
this.valid()
            },
            
checkForm: function () {
                
this.prepareForm();
                for (var 
0elements = (this.currentElements this.elements()); elements[i]; i++) {
                    if (
this.findByName(elements[i].name).length != undefined && this.findByName(elements[i].name).length 1) {
                        for (var 
cnt 0cnt this.findByName(elements[i].name).lengthcnt++) {
                            
this.check(this.findByName(elements[i].name)[cnt]);
                        }
                    } else {
                        
this.check(elements[i]);
                    }
                }
                return 
this.valid();
            },
            
element: function (a) {
                
this.lastElement this.validationTargetFor(this.clean(a));
                
this.prepareElement(a);
                
this.currentElements c(a);
                var 
this.check(a);
                if (
b)delete this.invalid[a.name]; else this.invalid[a.name] = true;
                if (!
this.numberOfInvalids())this.toHide this.toHide.add(this.containers);
                
this.showErrors();
                return 
b
            
}, showErrors: function (a) {
                if (
a) {
                    
c.extend(this.errorMapa);
                    
this.errorList = [];
                    for (var 
b in a)this.errorList.push({messagea[b], elementthis.findByName(b)[0]});
                    
this.successList c.grep(this.successList, function (d) {
                        return !(
d.name in a)
                    })
                }
                
this.settings.showErrors ?
                    
this.settings.showErrors.call(thisthis.errorMapthis.errorList) : this.defaultShowErrors()
            }, 
resetForm: function () {
                
c.fn.resetForm && c(this.currentForm).resetForm();
                
this.submitted = {};
                
this.lastElement null;
                
this.prepareForm();
                
this.hideErrors();
                
this.elements().removeClass(this.settings.errorClass)
            }, 
numberOfInvalids: function () {
                return 
this.objectLength(this.invalid)
            }, 
objectLength: function (a) {
                var 
0d;
                for (
d in a)b++;
                return 
b
            
}, hideErrors: function () {
                
this.addWrapper(this.toHide).hide()
            }, 
valid: function () {
                return 
this.size() ==
                
0
            
}, size: function () {
                return 
this.errorList.length
            
}, focusInvalid: function () {
                if (
this.settings.focusInvalid)try {
                    
c(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
                } catch (
a) {
                }
            }, 
findLastActive: function () {
                var 
this.lastActive;
                return 
&& c.grep(this.errorList, function (b) {
                    return 
b.element.name == a.name
                
}).length == && a
            
}, elements: function () {
                var 
this= {};
                return 
c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function () {
                    !
this.name &&
                    
a.settings.debug && window.console && console.error("%o has no name assigned"this);
                    if (
this.name in b || !a.objectLength(c(this).rules()))return false;
                    return 
b[this.name] = true
                
})
            }, 
clean: function (a) {
                return 
c(a)[0]
            }, 
errors: function () {
                return 
c(this.settings.errorElement "." this.settings.errorClassthis.errorContext)
            }, 
reset: function () {
                
this.successList = [];
                
this.errorList = [];
                
this.errorMap = {};
                
this.toShow c([]);
                
this.toHide c([]);
                
this.currentElements c([])
            }, 
prepareForm: function () {
                
this.reset();
                
this.toHide this.errors().add(this.containers)
            },
            
prepareElement: function (a) {
                
this.reset();
                
this.toHide this.errorsFor(a)
            }, 
check: function (a) {
                
this.validationTargetFor(this.clean(a));
                var 
c(a).rules(), falsee;
                for (
e in b) {
                    var 
= {methodeparametersb[e]};
                    try {
                        var 
c.validator.methods[e].call(thisa.value.replace(/r/g""), af.parameters);
                        if (
== "dependency-mismatch")true; else {
                            
false;
                            if (
== "pending") {
                                
this.toHide this.toHide.not(this.errorsFor(a));
                                return
                            }
                            if (!
g) {
                                
this.formatAndAdd(af);
                                return 
false
                            
}
                        }
                    } catch (
h) {
                        
this.settings.debug && window.console && console.log("exception occured when checking element " +
                        
a.id ", check the '" f.method "' method"h);
                        throw 
h;
                    }
                }
                if (!
d) {
                    
this.objectLength(b) && this.successList.push(a);
                    return 
true
                
}
            }, 
customMetaMessage: function (ab) {
                if (
c.metadata) {
                    var 
this.settings.meta c(a).metadata()[this.settings.meta] : c(a).metadata();
                    return 
&& d.messages && d.messages[b]
                }
            }, 
customMessage: function (ab) {
                var 
this.settings.messages[a];
                return 
&& (d.constructor == String d[b])
            }, 
findDefined: function () {
                for (var 
0arguments.lengtha++)if (arguments[a] !== undefined)return arguments[a]
            }, 
defaultMessage: function (a,
                                         
b) {
                return 
this.findDefined(this.customMessage(a.nameb), this.customMetaMessage(ab), !this.settings.ignoreTitle && a.title || undefinedc.validator.messages[b], "<strong>Warning: No message defined for " a.name "</strong>")
            }, 
formatAndAdd: function (ab) {
                var 
this.defaultMessage(ab.method), = /$?{(d+)}/g;
                if (
typeof d == "function")d.call(thisb.parametersa); else if (e.test(d))jQuery.format(d.replace(e"{$1}"), b.parameters);
                
this.errorList.push({messagedelementa});
                
this.errorMap[a.name] = d;
                
this.submitted[a.name] =
                    
d
            
}, addWrapper: function (a) {
                if (
this.settings.wrapper)a.add(a.parent(this.settings.wrapper));
                return 
a
            
}, defaultShowErrors: function () {
                for (var 
0this.errorList[a]; a++) {
                    var 
this.errorList[a];
                    
this.settings.highlight && this.settings.highlight.call(thisb.elementthis.settings.errorClassthis.settings.validClass);
                    
this.showLabel(b.elementb.message)
                }
                if (
this.errorList.length)this.toShow this.toShow.add(this.containers);
                if (
this.settings.success)for (0this.successList[a]; a++)this.showLabel(this.successList[a]);
                if (
this.settings.unhighlight) {
                    
0;
                    for (
this.validElements(); b[a]; a++)this.settings.unhighlight.call(thisb[a], this.settings.errorClassthis.settings.validClass)
                }
                
this.toHide this.toHide.not(this.toShow);
                
this.hideErrors();
                
this.addWrapper(this.toShow).show()
            }, 
validElements: function () {
                return 
this.currentElements.not(this.invalidElements())
            }, 
invalidElements: function () {
                return 
c(this.errorList).map(function () {
                    return 
this.element
                
})
            }, 
showLabel: function (ab) {
                var 
this.errorsFor(a);
                if (
d.length) {
                    
d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
                    
d.attr("generated") && d.html(b)
                } else {
                    
c("<" this.settings.errorElement "/>").attr({
                        
"for"this.idOrName(a),
                        
generatedtrue
                    
}).addClass(this.settings.errorClass).html(|| "");
                    if (
this.settings.wrapper)d.hide().show().wrap("<" this.settings.wrapper "/>").parent();
                    
this.labelContainer.append(d).length || (this.settings.errorPlacement this.settings.errorPlacement(dc(a)) : d.insertAfter(a))
                }
                if (!
&& this.settings.success) {
                    
d.text("");
                    
typeof this.settings.success == "string" d.addClass(this.settings.success) : this.settings.success(d)
                }
                
this.toShow =
                    
this.toShow.add(d)
            }, 
errorsFor: function (a) {
                var 
this.idOrName(a);
                return 
this.errors().filter(function () {
                    return 
c(this).attr("for") == b
                
})
            }, 
idOrName: function (a) {
                return 
this.groups[a.name] || (this.checkable(a) ? a.name a.id || a.name)
            }, 
validationTargetFor: function (a) {
                if (
this.checkable(a))this.findByName(a.name).not(this.settings.ignore)[0];
                return 
a
            
}, checkable: function (a) {
                return /
radio|checkbox/i.test(a.type)
            }, 
findByName: function (a) {
                var 
this.currentForm;
                return 
c(document.getElementsByName(a)).map(function (d,
                                                                      
e) {
                    return 
e.form == && e.name == && || null
                
})
            }, 
getLength: function (ab) {
                switch (
b.nodeName.toLowerCase()) {
                    case 
"select":
                        return 
c("option:selected"b).length;
                    case 
"input":
                        if (
this.checkable(b))return this.findByName(b.name).filter(":checked").length
                
}
                return 
a.length
            
}, depend: function (ab) {
                return 
this.dependTypes[typeof a] ? this.dependTypes[typeof a](ab) : true
            
}, dependTypes: {
                
"boolean": function (a) {
                    return 
a
                
}, string: function (ab) {
                    return !!
c(ab.form).length
                
}, "function": function (ab) {
                    return 
a(b)
                }
            }, 
optional: function (a) {
                return !
c.validator.methods.required.call(this,
                    
c.trim(a.value), a) && "dependency-mismatch"
            
}, startRequest: function (a) {
                if (!
this.pending[a.name]) {
                    
this.pendingRequest++;
                    
this.pending[a.name] = true
                
}
            }, 
stopRequest: function (ab) {
                
this.pendingRequest--;
                if (
this.pendingRequest 0)this.pendingRequest 0;
                
delete this.pending[a.name];
                if (
&& this.pendingRequest == && this.formSubmitted && this.form()) {
                    
c(this.currentForm).submit();
                    
this.formSubmitted false
                
} else if (!&& this.pendingRequest == && this.formSubmitted) {
                    
c(this.currentForm).triggerHandler("invalid-form", [this]);
                    
this.formSubmitted =
                        
false
                
}
            }, 
previousValue: function (a) {
                return 
c.data(a"previousValue") || c.data(a"previousValue", {
                    
oldnull,
                    
validtrue,
                    
messagethis.defaultMessage(a"remote")
                })
            }
        },
        
classRuleSettings: {
            
required: {requiredtrue},
            
email: {emailtrue},
            
url: {urltrue},
            
date: {datetrue},
            
dateISO: {dateISOtrue},
            
dateDE: {dateDEtrue},
            
number: {numbertrue},
            
numberDE: {numberDEtrue},
            
digits: {digitstrue},
            
creditcard: {creditcardtrue}
        },
        
addClassRules: function (ab) {
            
a.constructor == String this.classRuleSettings[a] = c.extend(this.classRuleSettings,
                
a)
        },
        
classRules: function (a) {
            var 
= {};
            (
c(a).attr("class")) && c.each(a.split(" "), function () {
                
this in c.validator.classRuleSettings && c.extend(bc.validator.classRuleSettings[this])
            });
            return 
b
        
},
        
attributeRules: function (a) {
            var 
= {};
            
c(a);
            for (var 
d in c.validator.methods) {
                var 
e;
                if (
=== "required" && typeof c.fn.prop === "function" a.prop(d) : a.attr(d))b[d] = e; else if (a[0].getAttribute("type") === d)b[d] = true
            
}
            
b.maxlength && /-1|2147483647|524288/.test(b.maxlength) && delete b.maxlength;
            return 
b
        
},
        
metadataRules: function (a) {
            if (!
c.metadata)return {};
            var 
c.data(a.form"validator").settings.meta;
            return 
c(a).metadata()[b] : c(a).metadata()
        },
        
staticRules: function (a) {
            var 
= {}, c.data(a.form"validator");
            if (
d.settings.rules)c.validator.normalizeRule(d.settings.rules[a.name]) || {};
            return 
b
        
},
        
normalizeRules: function (ab) {
            
c.each(a, function (de) {
                if (
=== false)delete a[d]; else if (e.param || e.depends) {
                    var 
true;
                    switch (
typeof e.depends) {
                        case 
"string":
                            
= !!c(e.dependsb.form).length;
                            break;
                        case 
"function":
                            
e.depends.call(bb)
                    }
                    if (
f)a[d] = e.param !== undefined ?
                        
e.param true; else delete a[d]
                }
            });
            
c.each(a, function (de) {
                
a[d] = c.isFunction(e) ? e(b) : e
            
});
            
c.each(["minlength""maxlength""min""max"], function () {
                if (
a[this])a[this] = Number(a[this])
            });
            
c.each(["rangelength""range"], function () {
                if (
a[this])a[this] = [Number(a[this][0]), Number(a[this][1])]
            });
            if (
c.validator.autoCreateRanges) {
                if (
a.min && a.max) {
                    
a.range = [a.mina.max];
                    
delete a.min;
                    
delete a.max
                
}
                if (
a.minlength && a.maxlength) {
                    
a.rangelength = [a.minlengtha.maxlength];
                    
delete a.minlength;
                    
delete a.maxlength
                
}
            }
            
a.messages && delete a.messages;
            return 
a
        
},
        
normalizeRule: function (a) {
            if (
typeof a == "string") {
                var 
= {};
                
c.each(a.split(/s/), function () {
                    
b[this] = true
                
});
                
b
            
}
            return 
a
        
},
        
addMethod: function (abd) {
            
c.validator.methods[a] = b;
            
c.validator.messages[a] = != undefined c.validator.messages[a];
            
b.length && c.validator.addClassRules(ac.validator.normalizeRule(a))
        },
        
methods: {
            
required: function (abd) {
                if (!
this.depend(db))return "dependency-mismatch";
                switch (
b.nodeName.toLowerCase()) {
                    case 
"select":
                        return (
c(b).val()) && a.length 0;
                    case 
"input":
                        if (
this.checkable(b))return this.getLength(a,
                            
b) > 0;
                    default:
                        return 
c.trim(a).length 0
                
}
            }, 
remote: function (abd) {
                if (
this.optional(b))return "dependency-mismatch";
                var 
this.previousValue(b);
                
this.settings.messages[b.name] || (this.settings.messages[b.name] = {});
                
e.originalMessage this.settings.messages[b.name].remote;
                
this.settings.messages[b.name].remote e.message;
                
typeof d == "string" && {urld} || d;
                if (
this.pending[b.name])return "pending";
                if (
e.old === a)return e.valid;
                
e.old a;
                var 
this;
                
this.startRequest(b);
                var 
= {};
                
g[b.name] = a;
                
c.ajax(c.extend(true, {
                    
urld,
                    
mode"abort"port"validate" b.namedataType"json"datagsuccess: function (h) {
                        
f.settings.messages[b.name].remote e.originalMessage;
                        var 
=== true;
                        if (
j) {
                            var 
f.formSubmitted;
                            
f.prepareElement(b);
                            
f.formSubmitted i;
                            
f.successList.push(b);
                            
f.showErrors()
                        } else {
                            
= {};
                            
|| f.defaultMessage(b"remote");
                            
i[b.name] = e.message c.isFunction(h) ? h(a) : h;
                            
f.showErrors(i)
                        }
                        
e.valid j;
                        
f.stopRequest(bj)
                    }
                }, 
d));
                return 
"pending"
            
}, minlength: function (abd) {
                return 
this.optional(b) || this.getLength(c.trim(a), b) >= d
            
}, maxlength: function (a,
                                    
bd) {
                return 
this.optional(b) || this.getLength(c.trim(a), b) <= d
            
}, rangelength: function (abd) {
                
this.getLength(c.trim(a), b);
                return 
this.optional(b) || >= d[0] && <= d[1]
            }, 
min: function (abd) {
                return 
this.optional(b) || >= d
            
}, max: function (abd) {
                return 
this.optional(b) || <= d
            
}, range: function (abd) {
                return 
this.optional(b) || >= d[0] && <= d[1]
            }, 
email: function (ab) {
                return 
this.optional(b) || /^((([a-z]|d|[!#$%&'*+-/=?^_`{|}~]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])+(.([a-z]|d|[!#$%&'*+-/=?^_`{|}~]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])+)*)|((x22)((((x20|x09)*(x0dx0a))?(x20|x09)+)?(([x01-x08x0bx0cx0e-x1fx7f]|x21|[x23-x5b]|[x5d-x7e]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(\([x01-x09x0bx0cx0d-x7f]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF]))))*(((x20|x09)*(x0dx0a))?(x20|x09)+)?(x22)))@((([a-z]|d|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(([a-z]|d|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])*([a-z]|d|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF]))).)+(([a-z]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(([a-z]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])*([a-z]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])))$/i.test(a)
            
},
            
url: function (ab) {
                return 
this.optional(b) || /^(https?|ftp)://(((([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(%[da-f]{2})|[!$&'()*+,;=]|:)*@)?(((d|[1-9]d|1dd|2[0-4]d|25[0-5]).(d|[1-9]d|1dd|2[0-4]d|25[0-5]).(d|[1-9]d|1dd|2[0-4]d|25[0-5]).(d|[1-9]d|1dd|2[0-4]d|25[0-5]))|((([a-z]|d|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(([a-z]|d|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])*([a-z]|d|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF]))).)+(([a-z]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(([a-z]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])*([a-z]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF]))).?)(:d*)?)(/((([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(%[da-f]{2})|[!$&'()*+,;=]|:|@)+(/(([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(%[da-f]{2})|[!$&'()*+,;=]|:|@)*)*)?)?(?((([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(%[da-f]{2})|[!$&'()*+,;=]|:|@)|[uE000-uF8FF]|/|?)*)?(#((([a-z]|d|-|.|_|~|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])|(%[da-f]{2})|[!$&'()*+,;=]|:|@)|/|?)*)?$/i.test(a)
            
},
            
date: function (ab) {
                return 
this.optional(b) || !/Invalid|NaN/.test(new Date(a))
            }, 
dateISO: function (ab) {
                return 
this.optional(b) || /^d{4}[/-]d{1,2}[/-]d{1,2}$/.test(a)
            }, 
number: function (ab) {
                return 
this.optional(b) || /^-?(?:d+|d{1,3}(?:,d{3})+)(?:.d+)?$/.test(a)
            }, 
digits: function (ab) {
                return 
this.optional(b) || /^d+$/.test(a)
            }, 
creditcard: function (ab) {
                if (
this.optional(b))return "dependency-mismatch";
                if (/[^
0--]+/.test(a))return false;
                var 
00false;
                
a.replace(/D/g"");
                for (var 
a.length 1>=
                
0g--) {
                    
a.charAt(g);
                    
parseInt(e10);
                    if (
f)if ((*= 2) > 9)-= 9;
                    
+= e;
                    
= !f
                
}
                return 
10 == 0
            
}, accept: function (abd) {
                
typeof d == "string" d.replace(/,/g"|") : "png|jpe?g|gif";
                return 
this.optional(b) || a.match(RegExp(".(" ")$""i"))
            }, 
equalTo: function (abd) {
                
c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo", function () {
                    
c(b).valid()
                });
                return 
== d.val()
            }
        }
    });
    
c.format c.validator.format
})(jQuery);
(function (
c) {
    var 
= {};
    if (
c.ajaxPrefilter)c.ajaxPrefilter(function (def) {
        
d.port;
        if (
d.mode == "abort") {
            
a[e] && a[e].abort();
            
a[e] = f
        
}
    }); else {
        var 
c.ajax;
        
c.ajax = function (d) {
            var 
= ("port"in d c.ajaxSettings).port;
            if ((
"mode"in d c.ajaxSettings).mode == "abort") {
                
a[e] && a[e].abort();
                return 
a[e] = b.apply(thisarguments)
            }
            return 
b.apply(thisarguments)
        }
    }
})(
jQuery);
(function (
c) {
    !
jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener && c.each({
        
focus"focusin",
        
blur"focusout"
    
}, function (ab) {
        function 
d(e) {
            
c.event.fix(e);
            
e.type b;
            return 
c.event.handle.call(thise)
        }

        
c.event.special[b] = {
            
setup: function () {
                
this.addEventListener(adtrue)
            }, 
teardown: function () {
                
this.removeEventListener(adtrue)
            }, 
handler: function (e) {
                
arguments[0] = c.event.fix(e);
                
arguments[0].type b;
                return 
c.event.handle.apply(thisarguments)
            }
        }
    });
    
c.extend(c.fn, {
        
validateDelegate: function (a,
                                    
bd) {
            return 
this.bind(b, function (e) {
                var 
c(e.target);
                if (
f.is(a))return d.apply(farguments)
            })
        }
    })
})(
jQuery);
?>
Онлайн: 1
Реклама