【发布时间】:2018-03-08 16:47:33
【问题描述】:
我正在使用带有引导程序的 ASP.net 4.5。 下面是我必须只允许某些字符的代码。 如何更改它以允许字符 a-zA-Z0-9_。 /,&|()!- 但不允许用户输入 http 或 www.
<input type="text" class="form-control" name="subject" id="subject" placeholder="Enter subject"
data-bv-message="The subject is not valid."
data-bv-notempty="true" data-bv-notempty-message="The subject is required and cannot be empty."
data-bv-regexp="true" data-bv-regexp-regexp="^[a-zA-Z0-9_. /,&|()!-]+$" data-bv-regexp-message="The subject can only consist of alphabetical, number, dot and underscore."
/>
【问题讨论】:
标签: asp.net validation bootstrap-4