如何将"Please match the required format"更改为"Not valid"?
我在Stackoverflow上找了很久都没有找到有用的内容,也许是重复问题,请帮帮我!
如果我在字段中键入'asd',然后按GO,然后继续输入消息,"Please match the required format"将出现
如果可能的话,我不想要混乱的代码,我希望它在html标签中!
<form id="banner-message">
<input value=""
name="email"
id="inputEmail"
class="form-control"
placeholder="email"
required=""
autofocus=""
oninvalid="this.setCustomValidity('Not Valid')" oninput="setCustomValidity('')"
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$">
<button class="btn btn-lg btn-block" type="submit">Go</button>
</form>