2014-04-25 53 views
0

jQuery的驗證,在Firefox按下回車鍵時,jQuery的驗證警報被觸發多次

showErrors: function(errorMap, errorList) { 
    var summary = "You have the following errors: \n"; 
    $.each(errorList, function() { 
     summary += " * " + this.message + "\n"; 
    }); 
    alert(summary); 
    this.defaultShowErrors(); 
} 

FIDDLE

回答

0

驗證奇怪的是做一套流程爲blurkeyup。您必須添加這些選項才能驗證爲false。

, 
onfocusout:false, 
onkeyup:false 

UPDATED FIDDLE