Skip to content

Commit b6a803f

Browse files
committed
Merge pull request posabsolute#562 from fmtn7/validate_non-visible_fields_patch
Validating Non-Visible Fields
2 parents 18cc199 + 65ff640 commit b6a803f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/jquery.validationEngine.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@
505505
++$.validationEngine.fieldIdCounter;
506506
}
507507

508-
if (field.is(":hidden") && !options.prettySelect || field.parent().is(":hidden"))
508+
if (!options.validateNonVisibleFields && (field.is(":hidden") && !options.prettySelect || field.parent().is(":hidden")))
509509
return false;
510510

511511
var rulesParsing = field.attr(options.validateAttribute);
@@ -1954,6 +1954,8 @@
19541954
focusFirstField:true,
19551955
// Show prompts, set to false to disable prompts
19561956
showPrompts: true,
1957+
// Should we attempt to validate non-visible input fields contained in the form? (Useful in cases of tabbed containers, e.g. jQuery-UI tabs)
1958+
validateNonVisibleFields: false,
19571959
// Opening box position, possible locations are: topLeft,
19581960
// topRight, bottomLeft, centerRight, bottomRight, inline
19591961
// inline gets inserted after the validated field or into an element specified in data-prompt-target

0 commit comments

Comments
 (0)