Hold-Krykke / Security_and_FullstackJavascript_Exam

4. Semester Security og Fullstack Javascript Eksamens Projekt
0 stars 0 forks source link

validateEmail.ts is too aggressive #36

Closed MalteMagnussen closed 4 years ago

MalteMagnussen commented 4 years ago

Find a better email regex, and replace it here: https://github.com/Hold-Krykke/Security_and_FullstackJavascript_Exam/blob/master/Backend/src/util/validateEmail.ts#L3

image

Runi-VN commented 4 years ago

I think we should implement one of the simpler regexes in the linked stackoverflow:
https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript

They argue that it is on OUR end to verify that an e-mail is the proper format, which is "stringwithpunctuation@stringwithpunctuation.string"

It is on the user to write the proper email. If they can't do that, it's on them.

I completely agree with this view. If the user fucks up, that's on them.

What we can do, is to have two email boxes (confirm email)