source: frontend/node_modules/schema-utils/declarations/validate.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.9 KB
Line 
1export { default as ValidationError } from "./ValidationError";
2export type JSONSchema4 = import("json-schema").JSONSchema4;
3export type JSONSchema6 = import("json-schema").JSONSchema6;
4export type JSONSchema7 = import("json-schema").JSONSchema7;
5export type ErrorObject = import("ajv").ErrorObject;
6export type ExtendedSchema = {
7 /**
8 * format minimum
9 */
10 formatMinimum?: (string | number) | undefined;
11 /**
12 * format maximum
13 */
14 formatMaximum?: (string | number) | undefined;
15 /**
16 * format exclusive minimum
17 */
18 formatExclusiveMinimum?: (string | boolean) | undefined;
19 /**
20 * format exclusive maximum
21 */
22 formatExclusiveMaximum?: (string | boolean) | undefined;
23 /**
24 * link
25 */
26 link?: string | undefined;
27 /**
28 * undefined will be resolved as null
29 */
30 undefinedAsNull?: boolean | undefined;
31};
32export type Extend = ExtendedSchema;
33export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema;
34export type SchemaUtilErrorObject = ErrorObject & {
35 children?: Array<ErrorObject>;
36};
37export type PostFormatter = (
38 formattedError: string,
39 error: SchemaUtilErrorObject,
40) => string;
41export type ValidationErrorConfiguration = {
42 /**
43 * name
44 */
45 name?: string | undefined;
46 /**
47 * base data path
48 */
49 baseDataPath?: string | undefined;
50 /**
51 * post formatter
52 */
53 postFormatter?: PostFormatter | undefined;
54};
55/**
56 * @param {Schema} schema schema
57 * @param {Array<object> | object} options options
58 * @param {ValidationErrorConfiguration=} configuration configuration
59 * @returns {void}
60 */
61export function validate(
62 schema: Schema,
63 options: Array<object> | object,
64 configuration?: ValidationErrorConfiguration | undefined,
65): void;
66/**
67 * @returns {void}
68 */
69export function enableValidation(): void;
70/**
71 * @returns {void}
72 */
73export function disableValidation(): void;
74/**
75 * @returns {boolean} true when need validate, otherwise false
76 */
77export function needValidate(): boolean;
Note: See TracBrowser for help on using the repository browser.