mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-24 12:13:59 +01:00
Core: Unhighlighting field if already highlighted when using remote rule.
Closes #1712. Refs #1669, #1375, #12.
This commit is contained in:
committed by
Markus Staab
parent
5fc3585c2a
commit
e9fd71d89b
11
test/test.js
11
test/test.js
@@ -42,7 +42,16 @@ $.mockjax( {
|
||||
$.mockjax( {
|
||||
url: "response.php",
|
||||
response: function( settings ) {
|
||||
this.responseText = settings.data.responseText || "";
|
||||
var responseText = settings.data.responseText;
|
||||
if ( responseText ) {
|
||||
if ( typeof responseText === "function" ) {
|
||||
this.responseText = responseText();
|
||||
} else {
|
||||
this.responseText = responseText;
|
||||
}
|
||||
} else {
|
||||
this.responseText = "";
|
||||
}
|
||||
this.responseStatus = settings.data.responseStatus || 200;
|
||||
this.responseTime = settings.data.responseTime || 100;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user