You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 63.0.3219.0 (Official Build) canary (64-bit)
Description:
Described in rc15 is a way to import single rules to keep the build small. This doesn't seem to work.
Steps To Reproduce:
Using the description given in the docs:
import Vue from 'vue';
import VeeValidate from 'vee-validate/dist/vee-validate.minimal';
import { Rules } from 'vee-validate';
Vue.use(VeeValidate);
// add the required rule
VeeValidate.Validator.extend('required', Rules.required);
I get this in the console:
"export 'Rules' was not found in 'vee-validate'
It could be that something in my code is wrong. I tried to find soem sort of export statement in the vee-validate.js which might export Rules in a way but couldn't find any. But that could also be caused by my misunderstanding of the codebase.
If this is working fine for anyone in here just close this issue please and I will dig into a bit more on my side.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this, This is a bug caused by Rules not being exported correctly by the plugin, Should be released in the next version. Sorry about that, I will release a quick fix today or tomorrow.
@escapedcat I'm using typescript and the Rules object is not being declared on the vee-validate.d.ts file. The only way to make it work is using the Validator.rules object and making a cast:
(Validator.rules as any).email(value.trim()) //Validates the email trimmed
Versions:
Description:
Described in rc15 is a way to import single rules to keep the build small. This doesn't seem to work.
Steps To Reproduce:
Using the description given in the docs:
I get this in the console:
It could be that something in my code is wrong. I tried to find soem sort of export statement in the
vee-validate.js
which might exportRules
in a way but couldn't find any. But that could also be caused by my misunderstanding of the codebase.If this is working fine for anyone in here just close this issue please and I will dig into a bit more on my side.
The text was updated successfully, but these errors were encountered: