Skip to content

Email Validations#28

Merged
MyrrhDev merged 2 commits intoMyrrhDev:mainfrom
aitikgupta:email-verify
Apr 15, 2021
Merged

Email Validations#28
MyrrhDev merged 2 commits intoMyrrhDev:mainfrom
aitikgupta:email-verify

Conversation

@aitikgupta
Copy link
Contributor

@aitikgupta aitikgupta commented Apr 14, 2021

This PR adds validations to individual emails separated by commas, and raises an alert displaying (one or more email addresses are incorrect).

This is currently all-or-nothing. We could easily perform a atleast-send-to-those-which-are-validated, but I believe this is more concrete in a never-failing conservative mindset.

Resolves #29

@MyrrhDev
Copy link
Owner

MyrrhDev commented Apr 15, 2021

Hey @aitikgupta ! This is a nice feature that from what I gather validates that the person typing an email or emails to be sent the broken links to are "correct", yeah? At the very least that's not what issue #14 was about so maybe remove that and open a new issue.

@aitikgupta
Copy link
Contributor Author

Oh wait, after going through the repository I came across

function validateURL(url) {
var http = new XMLHttpRequest();
http.open('HEAD', url, false);
http.send();
if (http.status == 404)
link_array.push(url)
return http;
}

I figured we're already doing validations for URLs, but after testing the extension myself, I found the emails are not validated - and assumed that's what was meant by "validating the URLs".

Let me create another issue (maybe reassign me to that one?)

@MyrrhDev
Copy link
Owner

You're right, but if you notice this is a veeery basic validation that doesn't actually examine the way the url was written (or actually any other http status codes even...). i.e. "www.goggle.com" should raise a warning and through regex python (if we were using regex python) and then a suggestion based on that would emerge. Not your bad though, that other issue needs more detail! :)

@MyrrhDev MyrrhDev merged commit 4690499 into MyrrhDev:main Apr 15, 2021
@MyrrhDev
Copy link
Owner

Reassigned the new issue to you, thank you again! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate emails before sending

2 participants