I'm sending json data with errrors back to script, but it won't stop at the messagebox (displaying errors), just moving on. This should be a easy error made by a rookie


Code:
...

        register_user.addButton('Register', function(){
            if (register_user.isValid()) {
                register_user.submit({url:'insert_user.php', 
                    waitMsg:'Please wait...', 
                    success:function(form, action){ 
                        Ext.MessageBox.alert('', action.result.msg);
                        location.href = 'reg_complete.php';
                    }
                }); 
            }else{
                Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
            }
        }, register_user);


    register_user.render('form-ct');

    
})