Question
Others
IN
Last activity: 19 Jun 2023 3:22 EDT
Email ID : Must be Regular expressions format
i want to validate email id in regular expression format and throw an error message enter a valid email address how can i achieve this i got this code from ootb prpc how to edit it or i can use new validation can anyone help me
if (theValue == null || theValue.trim().equals("")) return false; try { javax.mail.internet.InternetAddress emailAddr = new javax.mail.internet.InternetAddress(theValue); emailAddr.validate(); } catch (javax.mail.internet.AddressException ex){ return false; } return true;