forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-validator-model.d.ts
121 lines (103 loc) · 2.62 KB
/
form-validator-model.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { selectAll, select, createElement, Base, EmitType, detach } from '@syncfusion/ej2-base';import { extend, isNullOrUndefined, IKeyValue, EventHandler } from '@syncfusion/ej2-base';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, Event, onIntlChange } from '@syncfusion/ej2-base';import { Internationalization, L10n } from '@syncfusion/ej2-base';
import {ErrorOption,ValidArgs,FormEventArgs} from "./form-validator";
/**
* Interface for a class FormValidator
*/
export interface FormValidatorModel {
/**
* default locale variable
*/
locale?: string;
/**
* Ignores input fields based on the class name
*
* @default 'e-hidden'
*/
ignore?: string;
/**
* Maps the input fields with validation rules
*
* @default {}
*/
rules?: { [name: string]: { [rule: string]: Object } };
/**
* Sets the defined css class to error fields
*
* @default 'e-error'
*/
errorClass?: string;
/**
* Sets the defined css class to valid fields
*
* @default 'e-valid'
*/
validClass?: string;
/**
* Specify HTML element for error
*
* @default 'label'
*/
errorElement?: string;
/**
* Specify HTML element for error container
*
* @default 'div'
*/
errorContainer?: string;
/**
* Option to display the error
*
* @default ErrorOption.Label
* @deprecated
*/
errorOption?: ErrorOption;
/**
* Triggers when a field's focused out
*
* @event focusout
*/
focusout?: EmitType<Event>;
/**
* Trigger when keyup is triggered in any fields
*
* @event keyup
*/
keyup?: EmitType<KeyboardEvent>;
/**
* Triggers when a check box field is clicked
*
* @event click
*/
click?: EmitType<Event>;
/**
* Trigger when a select/drop-down field is changed
*
* @event change
*/
change?: EmitType<Event>;
/**
* Triggers before form is being submitted
*
* @event submit
*/
submit?: EmitType<Event>;
/**
* Triggers before validation starts
*
* @event validationBegin
*/
validationBegin?: EmitType<Object | ValidArgs>;
/**
* Triggers after validation is completed
*
* @event validationComplete
*/
validationComplete?: EmitType<Object | FormEventArgs>;
/**
* Assigns the custom function to place the error message in the page.
*
* @event customPlacement
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
customPlacement?: EmitType<HTMLElement | any>;
}