@patterninc/laravel_js_validator
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -99,1 +99,5 @@ "use strict"; | ||
}); | ||
test('passes for precision since it is ignored', () => { | ||
const results = index_1.Validator.validate('123.123', 'numeric|precision:3'); | ||
expect(results.success).toBe(true); | ||
}); |
@@ -7,2 +7,3 @@ 'use strict'; | ||
const ValidationMessages_js_1 = require("./ValidationMessages.js"); | ||
const IgnoredRules_js_1 = require("./IgnoredRules.js"); | ||
class Validator { | ||
@@ -183,2 +184,5 @@ constructor(data, rules) { | ||
validate(name, rule) { | ||
if (IgnoredRules_js_1.IgnoredRules.findIndex((item) => item.toLocaleLowerCase() === rule.name.toLocaleLowerCase()) > -1) { | ||
return; | ||
} | ||
const validationRules = new ValidationRules_js_1.ValidationRules(this.data, this.rules); | ||
@@ -185,0 +189,0 @@ let value = this.getValue(name); |
@@ -5,2 +5,3 @@ 'use strict'; | ||
import { validationMessages as messages } from './ValidationMessages.js'; | ||
import { IgnoredRules } from './IgnoredRules.js'; | ||
export class Validator { | ||
@@ -181,2 +182,5 @@ constructor(data, rules) { | ||
validate(name, rule) { | ||
if (IgnoredRules.findIndex((item) => item.toLocaleLowerCase() === rule.name.toLocaleLowerCase()) > -1) { | ||
return; | ||
} | ||
const validationRules = new ValidationRules(this.data, this.rules); | ||
@@ -183,0 +187,0 @@ let value = this.getValue(name); |
{ | ||
"name": "@patterninc/laravel_js_validator", | ||
"version": "1.0.10", | ||
"description": "", | ||
"version": "1.0.11", | ||
"description": "Validate values against Laravel validation rules", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "build": "rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && bash ./fixup", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
56391
26
1522
0