Skip to content
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
26 changes: 18 additions & 8 deletions js/jquery.validationEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,11 +915,9 @@
default:
var field_val = $.trim( field.val() );
var dv_placeholder = $.trim( field.attr("data-validation-placeholder") );
var placeholder = $.trim( field.attr("placeholder") );
if (
( !field_val )
|| ( dv_placeholder && field_val == dv_placeholder )
|| ( placeholder && field_val == placeholder )
) {
return options.allrules[rules[i]].alertText;
}
Expand Down Expand Up @@ -1716,12 +1714,24 @@
* field
*/
_closePrompt: function(field) {
var prompt = methods._getPrompt(field);
if (prompt)
prompt.fadeTo("fast", 0, function() {
prompt.parent('.formErrorOuter').remove();
prompt.remove();
});
var prompt = methods._getPrompt(field);

var form = $(field).closest('form, .validationEngineContainer');
var options = form.data('jqv');
var useFade = options ? options.useFadeOnClosePrompt : true;
if (prompt) {
var removePrompt = function(){
prompt.parent('.formErrorOuter').remove();
prompt.remove();
}

if (useFade) {
prompt.fadeTo("fast", 0, removePrompt);
} else {
removePrompt();
}
}

},
closePrompt: function(field) {
return methods._closePrompt(field);
Expand Down