dimanche 26 août 2018

debugging errors in vuelidate

In my Laravel 5.6/"vue": "^2.5.7/"vuetify": “^1.0.8” / "vuelidate": "^0.6.2" application I make validation with vuelidate methods like

        this.$v.$touch()  //it will validate all fields
        if (!this.$v.$invalid) { //invalid, becomes true when a validations return false
            this.updateuser()  //we  don't have validation error : make data updating
        } else {
            console.log("this.$v.::")
            console.log( this.$v )
            ...
        }

and somethimes I have a problem, that my error is not visible on the page and I have in console to look through all methods/properties of this.$v to find which field has :

.error= true

https://imgur.com/a/ofx9X6Z

Is there is some function/method how to run tgrough all methods and find this error and ouput field with error?

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire