1 |
|
2 | import { IValidationRule } from './IValidationRule';
|
3 | import { ValidationResult } from './ValidationResult';
|
4 | import { Schema } from './Schema';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class PropertySchema extends Schema {
|
20 | private _name;
|
21 | private _type;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | constructor(name?: string, type?: any, required?: boolean, rules?: IValidationRule[]);
|
34 | /**
|
35 | * Gets the property name.
|
36 | *
|
37 | * @returns the property name.
|
38 | */
|
39 | getName(): string;
|
40 | /**
|
41 | * Sets the property name.
|
42 | *
|
43 | * @param value a new property name.
|
44 | */
|
45 | setName(value: string): void;
|
46 | /**
|
47 | * Gets the property type.
|
48 | *
|
49 | * @returns the property type.
|
50 | */
|
51 | getType(): any;
|
52 | /**
|
53 | * Sets a new property type.
|
54 | * The type can be defined as type, type name or [[TypeCode]]
|
55 | *
|
56 | * @param value a new property type.
|
57 | */
|
58 | setType(value: any): void;
|
59 | /**
|
60 | * Validates a given value against the schema and configured validation rules.
|
61 | *
|
62 | * @param path a dot notation path to the value.
|
63 | * @param value a value to be validated.
|
64 | * @param results a list with validation results to add new results.
|
65 | */
|
66 | performValidation(path: string, value: any, results: ValidationResult[]): void;
|
67 | }
|