Roo/bootstrap/Form.js
authoredward <edward@roojs.com>
Fri, 17 Nov 2017 05:00:57 +0000 (13:00 +0800)
committeredward <edward@roojs.com>
Fri, 17 Nov 2017 05:00:57 +0000 (13:00 +0800)
Roo/bootstrap/Form.js

index 3f58c51..398ba56 100644 (file)
@@ -162,12 +162,15 @@ Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
         
         items.each(function(f){
             
-            if(f.xtype == 'RadioItem'){
+            if(f.xtype == 'RadioItem' && radioSet.indexOf(f.parent().name) === -1){
                 
-                if(radioSet.indexOf(f.parent().name) === -1){
-                    radioSet.push(f.parent().name);
+                radioSet.push(f.parent().name);
+                
+                if(f.parent().validate()){
+                    return;
                 }
                 
+                target = f.parent();
                 return;
             }
             
@@ -181,8 +184,6 @@ Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component,  {
            
         });
         
-        Roo.log(radioSet);
-        
         if(this.errPopover && !valid){
             this.showErrPopover(target);
         }