forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQForm.json
More file actions
127 lines (111 loc) · 3.38 KB
/
QForm.json
File metadata and controls
127 lines (111 loc) · 3.38 KB
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
122
123
124
125
126
127
{
"meta": {
"docsUrl": "https://v1.quasar.dev/vue-components/form"
},
"behavior": {
"$listeners": true
},
"props": {
"autofocus": {
"type": "Boolean",
"desc": "Focus first focusable element on initial component render",
"category": "behavior"
},
"no-error-focus": {
"type": "Boolean",
"desc": "Do not try to focus on first component that has a validation error when submitting form",
"category": "behavior"
},
"no-reset-focus": {
"type": "Boolean",
"desc": "Do not try to focus on first component when resetting form",
"category": "behavior"
},
"greedy": {
"type": "Boolean",
"desc": "Validate all fields in form (by default it stops after finding the first invalid field with synchronous validation)",
"category": "behavior",
"addedIn": "v1.1.1"
}
},
"slots": {
"default": {
"extends": "default"
}
},
"events": {
"submit": {
"desc": "Emitted when all validations have passed when tethered to a submit button"
},
"reset": {
"desc": "Emitted when all validations have been reset when tethered to a reset button; It is recommended to manually reset the wrapped components models in this handler"
},
"validation-success": {
"desc": "Emitted after a validation was triggered and all inner Quasar components models are valid"
},
"validation-error": {
"desc": "Emitted after a validation was triggered and at least one of the inner Quasar components models are NOT valid",
"params": {
"ref": {
"type": "Object",
"desc": "Vue reference to the first component that triggered the validation error",
"__exemption": [ "examples" ]
}
},
"addedIn": "v1.9.9"
}
},
"methods": {
"focus": {
"desc": "Focus on first focusable element/component in the form"
},
"validate": {
"desc": "Triggers a validation on all applicable inner Quasar components",
"params": {
"shouldFocus": {
"type": "Boolean",
"desc": "Tell if it should focus or not on component with error on submitting form; Overrides 'no-focus-error' prop if specified"
}
},
"returns": {
"type": "Promise<boolean>",
"desc": "Promise is always fulfilled and receives the outcome (true -> validation was a success, false -> invalid models detected)",
"examples": [
"validate().then(outcome => { ... })"
]
}
},
"resetValidation": {
"desc": "Resets the validation on all applicable inner Quasar components"
},
"submit": {
"desc": "Manually trigger form validation and submit",
"params": {
"evt": {
"type": "Object",
"desc": "JS event object",
"__exemption": [ "examples" ]
}
}
},
"reset": {
"desc": "Manually trigger form reset",
"params": {
"evt": {
"type": "Object",
"desc": "JS event object",
"__exemption": [ "examples" ]
}
}
},
"getValidationComponents": {
"desc": "Get array of children vue components that support validation",
"returns": {
"type": "Array",
"desc": "Vue components that support Quasar validation API",
"__exemption": [ "examples" ]
},
"addedIn": "v1.10.0"
}
}
}