I was looking for a very simple email validation. It just have to have an @ symbol and a period in the email. I want to accept for my string that will come in as a parameter.
Does anyone know of any easy email validations?
I was looking for a very simple email validation. It just have to have an @ symbol and a period in the email. I want to accept for my string that will come in as a parameter.
Does anyone know of any easy email validations?
The easiest way to do this is using InternetAddress from JavaMail. Just do new InternetAddress(email).validate()
and it will throw an AddressException
if it's invalid.