@darkwolf/validator
Advanced tools
Comparing version 13.22.0 to 13.22.1
@@ -12,2 +12,3 @@ const BASE58_ALPHABET = 'AveDarkwo1f23456789BCEFGHJKLMNPQRSTUVWXYZbcdghijmnpqstuxyz' | ||
const URL_PATTERN = '^https?://(((\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])|(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,})(:([1-9]\\d{0,3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d{1}|6553[0-5]))?(/[\\w-.%+@&:~]*)*(\\?[\\w-.%+@&=:;,~]*)?(#[\\w-]*)?$' | ||
const DOMAIN_URL_PATTERN = '^https?://(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}(/[\\w-.%+@&:~]*)*(\\?[\\w-.%+@&=:;,~]*)?(#[\\w-]*)?$' | ||
const EMAIL_PATTERN = '^[\\w-.]+@(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}$' | ||
@@ -37,2 +38,3 @@ const PHONE_NUMBER_PATTERN = '^\\+[1-9]\\d{6,14}$' | ||
URL_PATTERN, | ||
DOMAIN_URL_PATTERN, | ||
EMAIL_PATTERN, | ||
@@ -39,0 +41,0 @@ PHONE_NUMBER_PATTERN, |
@@ -430,2 +430,10 @@ const CodeError = require('@darkwolf/code-error') | ||
isDomainURL(value) { | ||
return this.isString(value) && this.isRegex(value, constants.DOMAIN_URL_PATTERN) | ||
} | ||
isDomainUrl(...args) { | ||
return this.isDomainURL(...args) | ||
} | ||
isEmail(value) { | ||
@@ -432,0 +440,0 @@ return this.isString(value) && this.isRegex(value, constants.EMAIL_PATTERN) |
{ | ||
"name": "@darkwolf/validator", | ||
"version": "13.22.0", | ||
"version": "13.22.1", | ||
"description": "Validator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -115,2 +115,4 @@ # Validator | ||
### isUrl(value) | ||
### isDomainURL(value) | ||
### isDomainUrl(value) | ||
### isEmail(value) | ||
@@ -117,0 +119,0 @@ ### isPhoneNumber(value) |
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
19558
442
133