1 | import { Schema } from './Schema';
|
2 | import { ValidationResult } from './ValidationResult';
|
3 | import { IValidationRule } from './IValidationRule';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare class ArraySchema extends Schema {
|
16 | private _valueType;
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | constructor(valueType?: any, required?: boolean, rules?: IValidationRule[]);
|
27 | /**
|
28 | * Gets the type of array elements.
|
29 | * Null means that elements may have any type.
|
30 | *
|
31 | * @returns the type of array elements.
|
32 | */
|
33 | getValueType(): any;
|
34 | /**
|
35 | * Sets the type of array elements.
|
36 | * Null means that elements may have any type.
|
37 | *
|
38 | * @param value a type of array elements.
|
39 | */
|
40 | setValueType(value: any): void;
|
41 | /**
|
42 | * Validates a given value against the schema and configured validation rules.
|
43 | *
|
44 | * @param path a dot notation path to the value.
|
45 | * @param value a value to be validated.
|
46 | * @param results a list with validation results to add new results.
|
47 | */
|
48 | protected performValidation(path: string, value: any, results: ValidationResult[]): void;
|
49 | }
|