fenextjs-validator
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -8,2 +8,3 @@ import { ErrorFenextjs } from "fenextjs-error/cjs/Fenextjs"; | ||
otherwise?: FenextjsValidatorClass; | ||
dataIsCurrent?: boolean; | ||
} | ||
@@ -10,0 +11,0 @@ /** |
@@ -686,7 +686,2 @@ "use strict"; | ||
} | ||
const parent = this.parent ?? this; | ||
// Si la validación "parent" no existe, no se hace nada. | ||
if (!parent) { | ||
return; | ||
} | ||
// Si la validación de datos necesarios no existen, no se hace nada. | ||
@@ -698,2 +693,9 @@ if (!this.whenValue) { | ||
const validator = this.whenValue[i]; | ||
let parent = this.parent; | ||
if (validator.dataIsCurrent === true) { | ||
parent = this; | ||
} | ||
if (!parent) { | ||
continue; | ||
} | ||
// Si whenIs es corrento ejecuta la validacion | ||
@@ -700,0 +702,0 @@ if (validator.is.onValidate(parent.data[validator.key]) === true) { |
{ | ||
"name": "fenextjs-validator", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
Sorry, the diff of this file is not supported yet
94627
1278