如何在没有输入数据的情况下离开文本框时验证文本框 [英] how to validate textbox when leaving the textbox without enter data
本文介绍了如何在没有输入数据的情况下离开文本框时验证文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< input type =textclass =form-control requiredmaxlength =11id =EmpId
name =EmpIdplaceholder =EmpId>
value =@(ViewBag.EmpId ?? String.Empty)required>
<input type="text" class="form-control required" maxlength="11" id="EmpId"
name="EmpId" placeholder="EmpId"
value="@(ViewBag.EmpId ?? String.Empty)" required>
推荐答案
电子邮件:
编辑电子邮件地址,并尝试更改状态。
状态
有效:{{myForm.myAddress。
Email:
Edit the e-mail address, and try to change the status.
Status
Valid: {{myForm.myAddress.
valid}}(如果为true,则该值符合所有条件)。
valid}} (if true, the value meets all criteria).
这篇关于如何在没有输入数据的情况下离开文本框时验证文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文