Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
stisch46037yRFC 5322 standard (yes that's an actual thing) is
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]) -
@Verstrahlter why don't you allow subdomains? i@send.nud.es wouldn't be possible with yours if im correct
-
aritzh7527y@gitreflog Oh wow, actually after trying just a little bit, it is not hard to read at all! I just saw so many symbols, I gave up without trying... Anyway, wouldn't it be easier to specify the allowed chars, instead of the opposite? (I guess it would make it more clear)
-
monr0e12457yEmail validation should be far simpler. If the email has an @ and at least one . in it, let it be.
-
okka2337y@monr0e Does not even have to have a dot technically
Great Talk on the matter of validating E-Mail-Addresses:
https://youtu.be/xxX81WmXjPg -
Polarina1207yEmail addresses are not parsable by regular expressions. Please never even try, it has long been proven to be impossible.
Don't mind me, just writing maintainable, legible, commented and documented code. What's that, an email validation? Let me just
/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
rant