Twitter bootstrap 3 使用bootstrapvalidator的多步骤注册可防止出错时继续

Twitter bootstrap 3 使用bootstrapvalidator的多步骤注册可防止出错时继续,twitter-bootstrap-3,registration,validation,multi-step,Twitter Bootstrap 3,Registration,Validation,Multi Step,我有一个多步骤注册表表单,每个步骤都在一个字段集中,我使用引导验证程序进行验证。我在第一步中设置了“下一步”按钮来切换验证。它运行良好 我的问题是,我必须防止下一步出错。 现在,在第一步中单击“下一步”进行验证,但立即进入下一步。 我想呆在那里直到验证成功 如何做到这一点? 我给我的代码块…我有所有的库包括 ... <fieldset id="first_step"> <h2 class="fs-title">Create your account<

我有一个多步骤注册表表单,每个步骤都在一个字段集中,我使用引导验证程序进行验证。我在第一步中设置了“下一步”按钮来切换验证。它运行良好

我的问题是,我必须防止下一步出错。 现在,在第一步中单击“下一步”进行验证,但立即进入下一步。 我想呆在那里直到验证成功

如何做到这一点? 我给我的代码块…我有所有的库包括

...
<fieldset id="first_step">
        <h2 class="fs-title">Create your account</h2>
        <div class="form-group">
            <label class="col-md-3 control-label">Username</label>
            <div class="col-md-9">
                <input type="text" class="form-control" name="uname" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">Password</label>
            <div class="col-md-9">
                <input type="password" class="form-control" name="pwd" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">Confirm Password</label>
            <div class="col-md-9">
                <input type="password" class="form-control" id="cpwd" />
            </div>
        </div>
        <input type="button" name="next" id="next" class="next action-button" value="Next" />
    </fieldset>
    <fieldset>
        <h2 class="fs-title">Personal Details</h2>
        <h3 class="fs-subtitle"></h3>
        <div class="form-group">
            <label class="col-md-3 control-label">*Register Number</label>
            <div class="col-md-9">
                <input type="text" class="form-control" id="Text1" name="reg" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">*Name</label>
            <div class="col-md-9">
                <input type="text" class="form-control" id="Text2" name="stname" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label"></label>
            <div class="col-md-offset-3 col-md-12">
            </div>
        </div>
        <input type="button" name="previous" class="previous action-button" value="Previous" />
        <input type="submit" id="sub_but" name="submit" class="submit action-button" value="Submit" />
    </fieldset>

    <script type="text/javascript">
    $(".next").click(function() {
    $('#msform').data('bootstrapValidator').validate();
    //prevent here????
    //Script to slide first fielset

    }
    $(".previous").click(function() {

    //Script to slide back to first fieldset

    }
    </script>
。。。
创建您的帐户
用户名
密码
确认密码
个人资料
*登记号码
*名字
$(“.next”)。单击(函数(){
$('#msform').data('bootstrapValidator').validate();
//在这里预防????
//第一节幻灯片的脚本
}
$(“.previous”)。单击(函数(){
//滑回第一个字段集的脚本
}