Hi Everyone! Does anyone know what validations Ne...
# general
a
Hi Everyone! Does anyone know what validations Netsuite uses for customer's email field, I need to put same validation on my other application so that user enter email which is acceptable in Netsuite. Thanks
s
You can use this function. const validateEmail = (email) => { return String(email) .toLowerCase() .match( /^(([^<>()[\]\\.,;:\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,}))$/ ); };
It should not return null.
b
you can take a look at what the client side validation for the email address looks like on the source of whatever page you are trying to match
most of the time that will be the
checkemailvalue
function
a
Thanks @Sai Krishna I will check this.