I want to validate a string which can be an email or multiple emails separated by commas.
For example:
bill.gates@hotmail.com -> TRUE bill -> FALSE
I would throw an $.trim(result[i]) into that validateMultipleEmailsCommaSeparated function as many people will add the space after their comma.
$.trim(result[i])
validateMultipleEmailsCommaSeparated
Of course that is a jQuery thing so do the equivalent your way.