2 ms·
The one time I had to validate email addresses without using another library, I settled on /.+@.+\..+/ Basically the same as yours, but validate that a TLD exi
by toomanybeersies 9y ago
The one time I had to validate email addresses without using another library, I settled on /.+@.+\..+/
Basically the same as yours, but validate that a TLD exists.
Technically, this would fail on a few valid email addresses: foo@localhost, foo@.co, or foo@2001:0db8:85a3:0000:0000:8a2e:0370:7334
All those are valid, but we decided that none of those would apply to any of our customers.