是否可以通过 j格鉴定,用急切的鉴定来显示验证摘要?
I m using MVC 3 (if it matters) and my forms validate when each element loses focus:
$( #myform ).validate({ onfocusout: function(element) { $(element).valid(); } };
This shows individual errors on each field, however I also want to show those errors in the validation summary block. However, that validation summary only shows up when the form is submitted, not on lost focus.
I ve tried hooking into showErrors, however that only gives me the current field error, not the current list of errors.
For completeness, here s the form code:
@using (Ajax.BeginForm(...))
{
<div class="field-panel">
@Html.EditorFor(m => m.PatientID)
...
</div>
<input type="submit" class="carecon-button-next" value="Next" />
@Html.ValidationSummary(null, new { @class = "validation-summary" })
}