anyproto / anytype-ts

Official Anytype client for MacOS, Linux, and Windows
https://anytype.io
Other
4.19k stars 254 forks source link

Emails with TLDs longer than 6 characters are not accepted #755

Closed sigaloid closed 3 months ago

sigaloid commented 3 months ago

Have you read a contributing guide?

Current Behavior

In the current checkEmail function below, the email must have a top level domain (anytype.io for example) between 2 and 6 letters. My own domain, matthew.science, has a 7 letter TLD, and thus is unable to be accepted. I recommend modifying this to accept at least up to 12 characters. There are TLDs with as many as 18, like .northwesternmutual, but these are far less likely.

https://github.com/anyproto/anytype-ts/blob/4f957686ee6748b10406a48291e73dfdb89bd245/src/ts/lib/util/common.ts#L466-L472

Please note this is referring to the top level domain, aka the part after the dot.

Expected Behavior

Accept an email with a longer TLD

Steps To Reproduce

Attempt to sign up under any subscription level with an email TLD that contains at least 7 letters

Environment

Irrelevant

Anything else?

No response