Skip to content

Commit a24e58a

Browse files
mlynchjzaefferer
authored andcommitted
Fixed dataFilter response issues in jQuery 1.5.2+. Fixes jquery-validation#405
1 parent 80d07b5 commit a24e58a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jquery.validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ $.extend($.validator, {
10301030
data: data,
10311031
success: function(response) {
10321032
validator.settings.messages[element.name].remote = previous.originalMessage;
1033-
var valid = response === true;
1033+
var valid = response === true || response === "true";
10341034
if ( valid ) {
10351035
var submitted = validator.formSubmitted;
10361036
validator.prepareElement(element);

test/methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ asyncTest("remote correct number of invalids", function() {
510510
if(json.username == 'asdf') {
511511
return "\"asdf is already taken\"";
512512
}
513-
return true;
513+
return "\"" + true + "\"";
514514
}
515515
}
516516
}

0 commit comments

Comments
 (0)