AnsweredAssumed Answered

Javascript for validating email used in a mapping Function. 

Question asked by nray708740 on Sep 23, 2016
Latest reply on Dec 18, 2017 by dcollins724067

Has anyone tried using Javascript within a function to validate if an email address is valid?     I am getting error messages with the following JavaScript via function used in a mapping within Boomi.        


function validateEmail(Input)


var re = /^(([^<>()\[\]\\.,;:\s@"] (\.[^<>()\[\]\\.,;:\s@"] )*)|(". "))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9] \.) [a-zA-Z]{2,}))$/;    

return re.test(email);

if (return true )

{Output = Input;}


{Output = null;}



Any suggestions?  Can anyone confirm this Javascript is correct?