fenextjs-validator
Advanced tools
Comparing version 4.6.3 to 4.6.4
@@ -454,1 +454,2 @@ import { ErrorFenextjs } from "fenextjs-error/cjs/Fenextjs"; | ||
export declare const FenextjsValidator: <T = any>(props?: FenextjsValidatorClassConstructorProps) => FenextjsValidatorClass<T>; | ||
export declare const FV: <T = any>(props?: FenextjsValidatorClassConstructorProps) => FenextjsValidatorClass<T>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FenextjsValidator = exports.FenextjsValidatorClass = void 0; | ||
exports.FV = exports.FenextjsValidator = exports.FenextjsValidatorClass = void 0; | ||
const Input_1 = require("fenextjs-error/cjs/Input"); | ||
@@ -372,3 +372,3 @@ const Fenextjs_1 = require("fenextjs-error/cjs/Fenextjs"); | ||
// Si no son de tipo objeto, lanza un ErrorInputInvalid para indicar que la validación falló. | ||
if (typeof this.data !== "object") { | ||
if (typeof this.data !== "object" && this.messageError?.isObject) { | ||
this.onError(fenextjs_interface_1.ErrorCode.INPUT_INVALID, this.messageError?.isObject); | ||
@@ -399,3 +399,4 @@ } | ||
// Si alguna propiedad no cumple con las reglas de validación, se lanza el error devuelto por la validación. | ||
if (r !== true) { | ||
if (r instanceof Fenextjs_1.ErrorFenextjs) { | ||
this.onError(r.code, r.msg ?? r?.message); | ||
throw r; | ||
@@ -962,2 +963,3 @@ } | ||
exports.FenextjsValidator = FenextjsValidator; | ||
exports.FV = exports.FenextjsValidator; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "fenextjs-validator", | ||
"version": "4.6.3", | ||
"version": "4.6.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
Sorry, the diff of this file is not supported yet
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
154416
2434