Efficient sanitize row delimit emails on text area - angular 8+
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

this bounty is to make a text area in angular that will help sanitize what the user might put in. in our use case we have emails and we expect just 1 per line. here are the things i would like to sanitize

leading and trailing spaces

empty rows of data

if the user puts in comma delimit emails we can remove the comma and space and push each new email to a new row

remove commas

remove all non alphanumeric, period, @ sign characters (to catch weird stuff like quotes

remove specifically "mailto:" strings.

bounty should not use jquery.

please use repl.it or jsfiddle for demo, makes it easy for testing

Crowdsource coding tasks.

1 Solution

Hello Qdev,

I've made validation per your requirements.

The code can be found on Repl.it.

Let me know if you need anything more.


it looks pretty good. i was going to run through the use cases but i noticed this email drop seems to disappear "Bountify info@bountify.co" if you exclude the quotes i would think it would end up something like Bountifyinfo@bountify.co - right?
Qdev 7 months ago
Hello Qdev. I've added a statement for space delimiter (previous was only for comma-space delimiter). If you now try "Bountify info@bountify.co", you would get "info@bountify.co". Thanks!
VladimirMikulic 7 months ago
Hello Qdev. I am pleased to see that my solution covered your needs. Let me know if you need anything more. Thanks!
VladimirMikulic 7 months ago