svelte-forms icon indicating copy to clipboard operation
svelte-forms copied to clipboard

fix: incorrect TLD length in email validation

Open jhwheeler opened this issue 1 year ago • 2 comments

The email validator has a character length restriction between 2 and 7 characters.

However, there are valid TLDs that are longer than that, e.g. .technology, .international, .photography, .university, .solutions, .foundation, etc. In this list of all currently valid TLDs, there are many that are longer than 7 characters; it seems that the maximum length currently in use is 24. In fact, TLDs per the ICANN spec can be up to 63 characters, according to MDN.

The solution is to change the maximum length in the regex from 7 to 63.

Merging this would close #119.

jhwheeler avatar Sep 11 '24 17:09 jhwheeler