PHP 8.2.30
Preview: validation-error.js Size: 967 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/backend/utils/errors/validation-error.js

import { ErrorTypeEnum } from '../../../utils/error-type.enum.js';

/**
 * Property Errors
 * @alias PropertyErrors
 * @memberof ValidationError
 */

/**
 * Error which is thrown when there are validation errors with records
 * @category Errors
 */
export class ValidationError extends Error {
  /**
   * Validation errors for all properties
   */

  /**
   * One root validation error i.e. thrown when user wants to perform
   * an action which violates foreign key constraint
   */

  /**
   * HTTP Status code: 400
   */

  /**
   * @param {PropertyErrors} propertyErrors     error messages
   * @param {RecordError} [baseError]           base error message
   */
  constructor(propertyErrors, baseError) {
    super('Resource cannot be stored because of validation errors');
    this.statusCode = 400;
    this.propertyErrors = propertyErrors;
    this.baseError = baseError || null;
    this.name = ErrorTypeEnum.Validation;
  }
}
export default ValidationError;

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
994 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
764 B lrw-r--r-- 2026-02-28 00:31:26
Edit Download
815 B lrw-r--r-- 2026-02-28 00:31:34
Edit Download
267 B lrw-r--r-- 2026-02-28 00:31:42
Edit Download
1.05 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
872 B lrw-r--r-- 2026-02-28 00:31:48
Edit Download
10 B lrw-r--r-- 2026-02-28 00:31:48
Edit Download
967 B lrw-r--r-- 2026-02-28 00:31:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).