jeudi 28 juin 2018

Long input pattern validation fails on Edge and IE11

I am checking a email field to include any of the accepted domain names at the end using a long list of those TLDs in the pattern attribute of the <input> field

Here is a shortened version with the middle part excluded:

pattern=".+(\.aaa|\.aarp|\.abarth|\.abb|\.abbott|\.abbvie|\.abc|\.able|\.abogado|\.abudhabi|{...}|\.zuerich|\.zw)"

The pattern is accepted just fine in Chrome and Firefox but Edge and IE11 fail to validate if the match is somewhere in the ".co*" area and later

for example "email@example.aaa" validates, whereas "email@example.com" does not

Take a look and test here: https://jsfiddle.net/qoalu/Lj0p4ys5/4/

Aucun commentaire:

Enregistrer un commentaire