подключил так,но так не работает
index.html?name=&email=&tel=&lenguage=:39 Uncaught TypeError: Cannot destructure property 'required' of 'window.validators' as it is undefined.
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
<script src="https://bundle.run/vuelidate@0.7.6"></script>
<script>
const { required, minLength } = window.validators; /*:class="{invalid:($v.name.$dirty && !$v.name.required)}*/
new Vue({
el: "#app",
data: {
name: '',
email: '',
tel: '',
lenguages:['en','ru','ua'],
lenguage:""
},
validations: {
name: {
required,
minLength: minLength(5)
},
email: {
email,
required,
},
tel: {
required,
minLength: minLength(5)
},
},
methods: {
submitHandler() {
if(this.$v.$invalid){
this.$v.$tach();
}
}
}
})
</script>
поделючил так <script src="https://cdn.jsdelivr.net/npm/vuelidate@0.7.6/lib/index.min.js"></script>
ошибка
index.js:3 Uncaught ReferenceError: exports is not defined
Uncaught ReferenceError: required is not defined