Validate prefilled jQuery form (invalidate on first field clear, ASP.NET and unobtrustive)

前端 未结 3 2065
庸人自扰
庸人自扰 2021-01-06 17:21

I have a form that can be filled, saved, loaded and re-edited.

When it is loaded and re-edited, it probably begins its life valid. When a field is valid upon

3条回答
  •  旧时难觅i
    2021-01-06 17:54

    You could try validating the form manually each time an input was changed.

    $(":input").live("change", function(){
        form.validate();
    })
    

    From looking at the documentation it seems that you can't call form.valid() without calling form.validate(); first.

提交回复
热议问题