Class EmailAddressHelper

java.lang.Object
com.helger.commons.email.EmailAddressHelper

@Immutable public final class EmailAddressHelper extends Object
Perform simple email address validation based on a regular expression.
Author:
Philip Helger
  • Field Details

  • Method Details

    • getUnifiedEmailAddress

      @Nullable public static String getUnifiedEmailAddress(@Nullable String sEmailAddress)
      Get the unified version of an email address. It trims leading and trailing spaces and lower-cases the email address.
      Parameters:
      sEmailAddress - The email address to unify. May be null.
      Returns:
      The unified email address or null if the input address is null.
    • isValid

      public static boolean isValid(@Nullable String sEmailAddress)
      Checks if a value is a valid e-mail address according to a certain regular expression.
      Parameters:
      sEmailAddress - The value validation is being performed on. A null value is considered invalid.
      Returns:
      true if the email address is valid, false otherwise.