@hapi/address
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -56,2 +56,8 @@ 'use strict'; | ||
if (options.maxDomainSegments) { | ||
if (segments.length > options.maxDomainSegments) { | ||
return Errors.code('DOMAIN_SEGMENTS_COUNT_MAX'); | ||
} | ||
} | ||
const tlds = options.tlds; | ||
@@ -58,0 +64,0 @@ if (tlds) { |
@@ -19,2 +19,3 @@ 'use strict'; | ||
DOMAIN_SEGMENTS_COUNT: 'Domain lacks the minimum required number of segments', | ||
DOMAIN_SEGMENTS_COUNT_MAX: 'Domain contains too many segments', | ||
DOMAIN_FORBIDDEN_TLDS: 'Domain uses forbidden TLD', | ||
@@ -21,0 +22,0 @@ DOMAIN_EMPTY_SEGMENT: 'Domain contains empty dot-separated segment', |
{ | ||
"name": "@hapi/address", | ||
"description": "Email address and domain validation", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"repository": "git://github.com/hapijs/address", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57101
2309