Any way to get Input Pattern to work in Safari and IE8 <

I have a password form field that has 3 requirements: 8 characters in length; at least 1 digit; at least 1 letter.

Here is what I did:

<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="" />

This worked perfectly everywhere except Safari and IE8. Any way to make these browsers play well?

+4
source share
1 answer

, pattern, - JavaScript, . ( - , ), polyfill HTML5 .

+3

Source: https://habr.com/ru/post/1526596/


All Articles