Class DomainNameUtil

java.lang.Object
io.micronaut.validation.validator.constraints.DomainNameUtil

public final class DomainNameUtil extends Object
Forked from Hibernate Validator.
Author:
Marko Bekhta, Guillaume Smet
  • Method Details

    • isValidEmailDomainAddress

      public static boolean isValidEmailDomainAddress(String domain)
      Checks the validity of the domain name used in an email. To be valid it should be either a valid host name, or an IP address wrapped in [].
      Parameters:
      domain - domain to check for validity
      Returns:
      true if the provided string is a valid domain, false otherwise
    • isValidDomainAddress

      public static boolean isValidDomainAddress(String domain)
      Checks validity of a domain name.
      Parameters:
      domain - the domain to check for validity
      Returns:
      true if the provided string is a valid domain, false otherwise