first commit
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s

This commit is contained in:
John
2026-09-23 17:31:02 +05:30
commit 69b4e68baf
51657 changed files with 3864077 additions and 0 deletions
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StandardValidation = void 0;
const utils_1 = require("../utils");
class StandardValidation {
constructor(validator, negated, options = [],
// For testing only.
// Deliberately not calling it `toString` in order to not override `Object.prototype.toString`.
stringify = utils_1.toString) {
this.validator = validator;
this.negated = negated;
this.options = options;
this.stringify = stringify;
}
async run(context, value, meta) {
const values = Array.isArray(value) ? value : [value];
values.forEach(value => {
const result = this.validator(this.stringify(value), ...this.options);
if (this.negated ? result : !result) {
context.addError({ type: 'field', message: this.message, value, meta });
}
});
}
}
exports.StandardValidation = StandardValidation;