isEmail(email, allowLocal?, allowTld?) | Checks if email is a valid email address. Ensures fields like the TLD are valid (no .con !) If allowLocal is true, emails like test@localhost are valid If allowTld is true, emails like test@com are valid |
isDomain(domain, allowLocal?) | Checks if domain is a valid domain name If allowLocal is true, domains like localhost.localdomain are valid, as are single name labels (like hostname ) |
isTld(tld, allowLocal?) | Checks if tld is a valid tld (.com is allowed but .con is not, for example) If allowLocal is true, tlds like localdomain are valid |
isIpAddress(address) | Checks if address is a valid IPv4 or IPv6 address |
isIpv4Address(address) | Checks if address is a valid IPv4 address |
isIpv6Address(address) | Checks if address is a valid IPv6 address |
isCountryCodeTld(ccTld) | Checks if ccTld is a valid country code TLD (like .au ) |
isGenericTld(gTld) | Checks if gTld is a valid generic TLD (like .com ) |
isInfrastructureTld(iTld) | Checks if iTld is a valid infrastructure TLD (only valid is .arpa ) |
isLocalTld(lTld) | Checks if lTld is a valid local TLD (like .localdomain ) |