Closed cexbrayat closed 3 years ago
It's being worked on in the next
branch, so far while I have a working draft of the basic validation functions. It still doesn't support most of the features at the moment and I'm slowly building them back up.
No ETA though
Awesome, thank you for your answer. I see you are writing the enxt version in TS as well so that should solve the typings issue π I look forward to give it a try, thank you for your work!
Both v3 and v4 are in TS π
Haha I know (and you know I know, as I already contributed a few things π). I meant that it will be in TS as well so the typings should not be an issue π .
Is there a way to install from next branch via NPM and have it working with Vue 3.0 beta?
Currently it's not finding import { required, min, max } from 'vee-validate/dist/rules';
as it seems installing from this branch is not having dist build available.
Also can't use Vue.component()
with Vue 3...?
@ux-engineer I'm working on a alpha/beta release very soon. The API has changed a little bit and the rules are no longer available as part of the core package and will be published independently in @vee-validate/rules
.
This is not only happening with Vue 3, I'm also experimenting problems when using extend() in a Nuxt wit Vue v2.6.11 with Typescript 3.8.3 and vee-validate 3.3.3
ERROR in /**/node_modules/vee-validate/dist/types/components/Observer.d.ts(19,66): nuxt:typescript 09:32:41
19:66 Namespace '"vue/types/vue"' has no exported member 'ExtendedVue'.
17 | failed: boolean;
18 | }
> 19 | export declare const ValidationObserver: import("vue/types/vue").ExtendedVue<Vue & {
| ^
20 | $_veeObserver: VeeObserver;
21 | $vnode: VNodeWithVeeContext;
22 | }, {
ERROR ERROR in /**/node_modules/vee-validate/dist/types/components/Provider.d.ts(3,66): nuxt:typescript 09:32:41
3:66 Namespace '"vue/types/vue"' has no exported member 'ExtendedVue'.
1 | import Vue from 'vue';
2 | import { ValidationFlags, ValidationResult, VeeObserver, VNodeWithVeeContext } from '../types';
> 3 | export declare const ValidationProvider: import("vue/types/vue").ExtendedVue<Vue & {
| ^
4 | $_veeObserver: VeeObserver;
5 | _needsValidation: boolean;
6 | _inputEventName: string;
ERROR ERROR in /**/node_modules/vee-validate/dist/types/localeChanged.d.ts(2,50): nuxt:typescript 09:32:41
2:50 Namespace '"vue/types/vue"' has no exported member 'CombinedVueInstance'.
1 | import Vue from 'vue';
> 2 | declare const EVENT_BUS: import("vue/types/vue").CombinedVueInstance<Vue, object, object, object, Record<never, any>>;
| ^
3 | export declare function localeChanged(): void;
4 | export { EVENT_BUS };
5 |
now it's not sure if it is the same issue, the problem is that vee-validate declaration files are not able to find ExtendedVue and CombinedVueInstance from vue types. I'm going to create a new issue and feel free to mark it as duplicated @logaretm
thx β€οΈ
Has there been any update on this? I am currently experiencing a similar problem and I am on Vue 2.6.11 and Vee-Validate 3.3.8 and Typescript 3.8 .
Are there any work arounds? @logaretm
Let me clarify that what I am experiencing is an error at runtime
vee-validate.esm.js:853 Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_0___default.a is not a constructor
at Module.<anonymous> (vee-validate.esm.js:853)
at __webpack_require__ (bootstrap:19)
at Object.<anonymous> (app.ts:4)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83
@earlwilson can you show me a code snippet of your setup? it will help a lot if you reproduce it on codesandbox.
@logaretm now that Vue 3.0 is marked stable, how is the development of Vue 3.0 support for this library progressing?
@ux-engineer You can use v4
releases with Vue 3, it is still at alpha stages but I think it can go beta very soon. There are a few scenarios I haven't tested and the documentation content is not finalized.
For the documentation, check it here: https://vee-validate.logaretm.com/v4/guide/overview
(I spent a few time searching for the v4 documentation, so that might help some folks π )
For the documentation, check it here: https://vee-validate.logaretm.com/v4/guide/
(I spent a few time searching for the v4 document, so that might help some folks π )
Page Not Found Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
@ux-engineer Sorry, didn't know why it was missing the last part... I just updated it.
From the first glance I'm wondering how well does this work when used with a front-end framework like Bootstrap-Vue, which has it's own form elements...
@ux-engineer I never used Bootstrap-Vue, but I guess, you'll just have to use the "as" prop like that ?
<template>
<Form v-slot="{ errors }">
<Field name="field" as="b-form-input" :rules="isRequired">
{{ errors.field }}
</Form>
</template>
@ux-engineer It should work as @TheHerobrine pointed out, it's too early to say as I think Vue 3 support from UI libraries is still underway.
v4 is now live, still residing in the next
tag to prevent accidental installs with Vue 2
I apoligize if there is a tracking issue for this, but I could not find one.
Is your feature request related to a problem? Please describe.
Currently, we can not use vee-validate with Vue 3 in a CLI project with TypeScript. There are errors on :
yarn build
yarn serve
and at runtimeWhen using
vee-validate@3.2.5
with Vue 3 (3.0.0-alpha.7
at the moment), the TyepScript compiler throws onyarn build
:Then
yarn serve
also complains:and then it throws at runtime:
What is your plan for Vue 3 support?