diff --git a/types/vuelidate/vue.d.ts b/types/vuelidate/vue.d.ts index 8232d96038..eadd30ea77 100644 --- a/types/vuelidate/vue.d.ts +++ b/types/vuelidate/vue.d.ts @@ -6,13 +6,17 @@ import { Validation } from './vuelidate' declare module 'vue/types/vue' { type ValidationProperties = { - [P in keyof V]?: Validation & ValidationProperties + [P in keyof V]?: Validation & ValidationProperties & ValidationEvaluation } interface ValidationGroups { [groupName: string]: Validation & ValidationProperties } + interface ValidationEvaluation { + [ruleName: string]: boolean + } + interface Vue { $v: ValidationProperties & ValidationGroups & Validation diff --git a/types/vuelidate/vuelidate-tests.ts b/types/vuelidate/vuelidate-tests.ts index d69d772405..794c2473fe 100644 --- a/types/vuelidate/vuelidate-tests.ts +++ b/types/vuelidate/vuelidate-tests.ts @@ -166,6 +166,12 @@ export class ValidComponent extends Vue { get isRepoValid() { return !this.$v.$invalid } + + get isPasswordLengthOk() { + if (this.$v.password) { + return !this.$v.password.minLength + } else return false + } } @Component({