我有一个密码表单字段,它有三个要求:长度为8个字符;至少1个数字;至少1个字母。
这是我所做的:
<input class="test" id="thepassword" title="Password Must Contain 8 characters with at least 1 number and 1 letter" type="password" name="thepassword" pattern="(?=.*\d)(?=.*[A-Za-z])\w{8,}" placeholder="Create Password *" required="" />
这在除了Safari和IE8以外的所有浏览器上都可以完美运行。有没有什么方法让这些浏览器也能正常工作?