清晰的验证摘要MVC3 [英] clear validation summary mvc3

查看:158
本文介绍了清晰的验证摘要MVC3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用验证MVC 3不显眼的概念。它是在客户机/服务器一面。问题做工精致是它不会清楚,直到我再次命中服务器。

I am using mvc 3 unobtrusive concept for validation . It is working fine at client/server side.The problem is that it wont clear until I hit the server again.

有没有额外的code I必须写清除验证摘要?

Is there any extra code i have to write to clear validation summary ?

推荐答案

code清除验证摘要:

code to clear the validation summary:

function clearValidationSummary() {
    var container = $('form').find('[data-valmsg-summary="true"]');
    var list = container.find('ul');

    if (list && list.length) {
        list.empty();
        container.addClass('validation-summary-valid').removeClass('validation-summary-errors');
    }
}

这篇关于清晰的验证摘要MVC3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆