HTML5电子邮件输入未验证电子邮件地址?

时间:2015-09-15 09:35:44

标签: javascript html5 email

有人可以帮我弄清楚为什么这个输入字段让我感到悲伤?

<input class="form-field" placeholder="Email" type="email" name="CEMAIL" required oninvalid="setCustomValidity('Please enter a valid email address.')"/>

当您输入任何内容时,当您输入任何内容时,以及输入完全有效的电子邮件地址时,它将返回我的自定义消息。我的doctype已使用

设置为html5
<!DOCTYPE html>
<form action="newuserlogin.php" name="registerform" method="post">
<div class="form-title"><h1 style="width:100%;">New Customers Register</h1></div>
<p style="margin-bottom: 30px;">If you are new here then you will need to register an account with us. Please use the form on this page to register for your free acount.</p>
<input class="form-field" placeholder="First Name" type="text" name="FNAME" required />
<input class="form-field" placeholder="Last Name" type="text" name="LNAME" required />
<input class="form-field" id="pass1" placeholder="Password" type="password" name="ACCESS" required />
<input class="form-field" id="pass2" placeholder="Confirm Password" type="password" name="ACCESSCONF" required />
<input class="form-field" placeholder="Email" type="email" name="CEMAIL" required oninvalid="setCustomValidity('Please enter a valid email address.')" />
<input class="form-field" placeholder="Email Confirmation" type="email" name="CEMAILCONF" required oninvalid="setCustomValidity('Please enter a valid email address.')" />
<input class="form-field" placeholder="Phone Number" type="text" required pattern="^\s*\(?(020[7,8]{1}\)?[ ]?[1-9]{1}[0-9{2}[ ]?[0-9]{4})|(0[1-8]{1}[0-9]{3}\)?[ ]?[1-9]{1}[0-9]{2}[ ]?[0-9]{3})\s*$" name="CPHONE" oninvalid="setCustomValidity('Please enter a valid phone number with no spaces.')" />
<input class="form-field" placeholder="House Name/Number" type="text" required name="CHNAME" />
<input class="form-field" placeholder="Address Line 1" type="text" required name="ADL1" />
<input class="form-field" placeholder="Address Line 2" type="text" required name="ADL2" />
<input class="form-field" placeholder="Post Code" type="text" required name="CPOSTC" />
<h3><div class="form-title">Preferred Delivery Times</div></h3>
<p style="margin-bottom: 30px;">Could you please provide us with any delivery information you think we need to know to deliver to your property.</p>
<p><textarea class="form-field2" placeholder="Please write some specific delivery instructions" type="text" name="DSPECD" /></textarea></p>

<div class="submit-container">
<input onclick="BothFieldsIdenticalCaseSensitive('pass1','pass2');" type="image" style="float: left; width: 95%; height: auto;" name="submit" src="/demo/img/register-account.png" border="0" alt="Submit" value="Submit" /></div>
</form>

1 个答案:

答案 0 :(得分:2)

您确定在表单中使用提交或按钮发送吗?

thresh = 0.8  # choose your own value 
y_test_binary = np.where(y_test > thresh, 1, 0) 
# creates an array with 1 where y_test>thresh, 0 elsewhere

f1_score(y_true, y_pred_binary, average='micro')
  • 这必须工作

编辑:如果您使用的是HTML5 ..为什么输入结束时使用/&gt; ...只是&gt;足够......

!!!!您的最后输入必须是TYPE =“SUBMIT”....