-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.d.ts
65 lines (62 loc) · 1.41 KB
/
index.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
/** vuelidate-property-decorators verson 1.0.0 MIT LICENSE copyright 2019 mesemus
*
* https://github.com/mesemus/vuelidate-property-decorators
*
**/
/**
* decorator for validations for all fields. Usage:
*
* import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';
* import {required} from 'vuelidate/lib/validators'
*
* @Component({})
* class Blah extends Vue {
*
* name = '';
*
* @Validations()
* validations = {
* name: {required},
* }
* }
*
*
* Template:
*
* <q-input v-model="$v.name.$model">
*
* validations may be a function which gets "this" pointing to the component instance:
*
* @Validations()
* validations() {
* return {
* // something with this.
* }
* }
*
*/
export declare function Validations(): PropertyDecorator;
/**
* decorator for a validation on a single field. Usage:
*
* import {Component, Vue, Prop, Watch, Emit} from 'vue-property-decorator';
* import {required} from 'vuelidate/lib/validators'
*
* @Component({})
* class Blah extends Vue {
*
* @Validate({required}})
* name = '';
*
* }
*
* Template:
*
* <q-input v-model="$v.name.$model">
*
* validation options may be a function which gets "this" pointing to the component instance:
*
* @Validate(() => ({'minLen': minLength(this.dynamicMinLength) }) )
* name = ''
*/
export declare function Validate(rules: any): PropertyDecorator;