Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jquery.validity.core.js #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/jquery.validity.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ $.fn.extend({

// If the user entered a validation function then just call
// that at the appropriate time:
else if ($.isFunction(arg)) {
else if (typeof arg === "function") {
f = arg;
}

Expand Down Expand Up @@ -349,7 +349,7 @@ $.fn.extend({
// Some of the named rules can be functions, such as 'date'. If the
// discovered rule is a function use it as such. Otherwise, assume
// it's a RegExp.
$.isFunction(rule) ?
typeof rule === "function" ?

function(obj) {
return !obj.value.length || rule(obj.value);
Expand Down Expand Up @@ -652,7 +652,7 @@ $.fn.extend({
if ($reduction.length) {

// Figure out what arguments were specified.
if ($.isFunction(arg0)) {
if (typeof arg0 === "function") {
transform = arg0;

if (typeof (arg1) == "string") {
Expand Down Expand Up @@ -722,7 +722,7 @@ $.fn.extend({
if ($reduction.length) {

// Figure out what arguments were specified.
if ($.isFunction(arg0)) {
if (typeof arg0 === "function") {
transform = arg0;

if (typeof (arg1) == "string") {
Expand Down Expand Up @@ -930,7 +930,7 @@ $.fn.extend({

// In the case that 'expression' is a function, use it as a
// regimen on each matched element individually:
if ($.isFunction(expression)) {
if (typeof expression === "function") {
return validate(
this,
expression,
Expand Down