Class DomainNameUtil
java.lang.Object
io.micronaut.validation.validator.constraints.DomainNameUtil
Forked from Hibernate Validator.
- Author:
- Marko Bekhta, Guillaume Smet
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidDomainAddress
(String domain) Checks validity of a domain name.static boolean
isValidEmailDomainAddress
(String domain) Checks the validity of the domain name used in an email.
-
Method Details
-
isValidEmailDomainAddress
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
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
-