@darkwolf/validator
Advanced tools
Comparing version 6.6.9 to 6.7.0
{ | ||
"name": "@darkwolf/validator", | ||
"version": "6.6.9", | ||
"version": "6.7.0", | ||
"description": "Validator", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -100,1 +100,10 @@ # Validator | ||
### isJWT(value?) | ||
## Error Codes | ||
#### invalid-options | ||
#### invalid-name | ||
#### invalid-complete | ||
#### invalid-generate-messages | ||
#### invalid-throw-errors | ||
#### invalid-custom-error | ||
#### invalid-callback | ||
#### invalid-error-message |
@@ -9,3 +9,3 @@ const TIMESTAMP_REGEX = /^[1-9]\d{11,12}$/ | ||
const ASCII_REGEX = /^[ -~]+$/ | ||
const BASE64_REGEX = /^(([a-z\d+/]{4})*([a-z\d+/]{3}=|[a-z\d+/]{2}==)?){4,}$/i | ||
const BASE64_REGEX = /^([a-z\d+/]{4}|([a-z\d+/]{3}=|[a-z\d+/]{2}==)|([a-z\d+/]{4})+([a-z\d+/]{3}=|[a-z\d+/]{2}==)?)$/i | ||
const BASE64URL_REGEX = /^[\w-]+$/ | ||
@@ -12,0 +12,0 @@ const BASE58_REGEX = /^[AveDarkwo1f23456789BCEFGHJKLMNPQRSTUVWXYZbcdghijmnpqstuxyz]+$/ |
@@ -400,3 +400,3 @@ const CodeError = require('@darkwolf/code-error') | ||
if (this.hasOwnProperty('value')) { | ||
if (!this.hasOwnProperty('optional') || this.hasOwnProperty('optional') && !this._isUndefined(this.value)) { | ||
if (!this.hasOwnProperty('optional') || this.hasOwnProperty('optional') && this._isUndefined(this.value)) { | ||
if (this._isUndefined(this.isValid) || this.isValid || this.complete) { | ||
@@ -403,0 +403,0 @@ const isValid = !!callback(this.value, ...args) |
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
30287
109