Commit fc51dce3 authored by sjerdo's avatar sjerdo Committed by nikunj
Browse files

Issue #2914383 by sjerdo, dmsmidt: Clientside Validation States JS error for radios

parent 8f3ce6c1
......@@ -24,8 +24,15 @@
return required !== 0;
}
$(document).bind('state:required', function(e) {
if (e.trigger) {
$(e.target).valid();
if (!e.trigger) {
return;
}
var $target = $(e.target).not(':hidden');
if (!$target.is('input') && !$target.is('select') && !$target.is('textarea')) {
$target = $target.find('input,select,textarea').not(':hidden');
}
if ($target.length) {
$target.valid();
}
});
$(document).bind('clientsideValidationInitialized', function(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment