[英]input type email allows everything
我正在嘗試在 HTML5 的表單中添加 email 輸入,但不知何故,它仍然允許我寫任何沒有 @ 和 email 包含的其他內容的東西。
<input class="form-control" type="email" id="email" name="email" required>
也試過:
<input type="text" pattern="/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" class="form-control" id="email" name="email" required>
如果我寫錯了,仍然沒有任何反應。
如果您在輸入時沒有嘗試驗證,那么在您提交后它會自動顯示錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.