vee-validate

How do I stop displaying the inline validation error message in Vuetify?

女生的网名这么多〃 提交于 2021-02-11 08:28:05
问题 I need to display all form validation errors in one alert at the top of a form when the user clicks submits (not inline with the input elements). How do I suppress the inline validation error message if I am using Vuetify and Vee-Validation. (I will display errors in an alert using the $errors array). There is nothing about this in the documentation. I tried not passing anything in error-messages, but then I lose the red outline on the invalid field. My field is configured like this <v-text

Access to a function\$refs in another component not in the same level as current one

杀马特。学长 韩版系。学妹 提交于 2021-02-10 15:52:06
问题 I've a Vue 2 application, with different components nested. Their structure is kinda (I'm skipping the not-relevant ones for my question): <root> <app> <component1/> ... <component3> <billingAddress> <customForm/> </billingAddress> <shippingAddress> <customForm/> </shippingAddress> </component3> ... <lastComponent/> </app> </root> The customForm1 and 2 contain a form, validated via vee-validate - so there' a ValidationObserver component. Those two forms are validated at the relative submit -

Access to a function\$refs in another component not in the same level as current one

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-10 15:49:39
问题 I've a Vue 2 application, with different components nested. Their structure is kinda (I'm skipping the not-relevant ones for my question): <root> <app> <component1/> ... <component3> <billingAddress> <customForm/> </billingAddress> <shippingAddress> <customForm/> </shippingAddress> </component3> ... <lastComponent/> </app> </root> The customForm1 and 2 contain a form, validated via vee-validate - so there' a ValidationObserver component. Those two forms are validated at the relative submit -

Vee Validate 3 catch errors on form submit

岁酱吖の 提交于 2021-01-29 05:13:32
问题 How do i catch if form submit fails in vee-validate? I have the following component <template> <ValidationObserver tag='div' class='bg-white pt-6 pb-6 mb-4' v-slot='{ handleSubmit }'> <form @submit.prevent='handleSubmit(onSubmit)' class='mx-auto rounded-lg overflow-hidden pt-6 pb-6 space-y-10' :class="{'is-loading' : isLoading}" > <div class='flex flex-wrap -mx-3 mb-6'> <div class='w-full md:w-3/12 px-3 mb-6 md:mb-5'> <ValidationProvider v-slot='{ classes, errors }' rules='required' name=

Vue / Vuetify - How to make a validation on each chip item instead of the entire select input

孤者浪人 提交于 2020-12-31 05:44:38
问题 Does anyone know how to make validation (with vee-validate) on each chips item? I have this piece of code: <v-select class="elevation-0 mt-border-bottom" v-model="PhoneNumber" label="Add phone number" chips tags solo prepend-icon="phone" clearable :error-messages="errors.collect('Phone Number')" v-validate="'required|numeric'" data-vv-name="Phone Number" required > <template slot="selection" slot-scope="data"> <v-chip close outline dark @input="remove(data.item)" :selected="data.selected" >

Vue.js and vue-phone-number-input package component : set country code and phone number programmatically

倾然丶 夕夏残阳落幕 提交于 2020-01-05 04:14:19
问题 In my Laravel + Vue.js SPA (Single Page Application), I am using BootstrapVue , vue-phone-number-input package and VeeValidate. Upon inputting the country code and phone number, I can retrieve them seperately in the methods part. The mobile (or phone) number input is inside a form. After validating the form, I save the data ( country code and phone number each, as the component has 2 parts: country code and phone number. See the image in the provided link of the package ) in database table.

Vee-Validate validateAll() with scope

穿精又带淫゛_ 提交于 2020-01-03 13:56:15
问题 I have a scenario where I have sectioned out (scoped) a form so that I can validate small chunks at a time using the following function. validateScope (scope) { return this.$validator.validateAll(scope); } I want to do one final validation of the entire form before I submit it to the server; however, validateAll() doesn't seem to pick up inputs that have been added to a scope. I've also tried just validating each scope and then submit the form if they are ALL valid, but I am not sure how to

Vue.js BootstrapVue : Veevalidate cannot validate datepicker

别来无恙 提交于 2019-12-28 07:09:26
问题 In my Laravel+Vue.js SPA ( Single Page Application) I am using the datepicker package from here, BootstrapVue from here and Veevalidate from here . I think I need to show only the code inside my component file as only the datepicker component causes the problem and not other ones. My code follows in EditProfile.vue : <ValidationObserver ref="form" v-slot="{ passes }"> <div id="registration_form"> <b-form @submit.prevent="passes(onSubmit)" @reset="resetForm"> <ValidationProvider vid="name"

Vue.js - validation fails for file upload in axios when multipart/form-data used in header

眉间皱痕 提交于 2019-12-27 17:59:26
问题 I am building a Laravel+Vue.js SPA (Single Page Application) with BootstrapVue, VeeValidate and axios as the HTTP client. Inside axios, when I use multipart/form-data; boundary=${uploadForm._boundary} as the Content-Type in headers then all the validations in Laravel Controller method fail . But if I use 'content-type': 'multipart/form-data' in header then validation works except the file input field. The file field becomes empty in Laravel controller method. This happens within the component

Vee-validate not working with scopes using Nuxt.js and Vuetify

落爺英雄遲暮 提交于 2019-12-24 18:33:47
问题 I'm having some validation problems with vee-validate and Vuetify: I have two forms with two different scopes and both are submitted in one function. the validation is working on submit but it's not showing the input errors on the UI: The inputs with different scopes: <v-text-field id="PersonalName" v-model="PersonalName" label="Name" :error-messages="errors.collect('Name')" v-validate="'required|alpha_spaces'" data-vv-name="Name" data-vv-scope="scopePersonal" prepend-icon="face" ></v-text