[Vuejs]-Check validity of multiple forms with vuetify watch option?

0๐Ÿ‘

โœ…

Use a computed property.

<button :disabled='shouldDisable'>Hello</button>
computed: {
   shouldDisable() {
      return !this.contactValid || !this.addressValid || !this.infoValid;
   }
}

0๐Ÿ‘

use vue computed property:

  data: () => ({
     infoValid: false,
     contactValid: false,
     addressValid: false
  }),
  computed: {
     formsValid() {
       if (this.infoValid && this.contactValid && this.addressValid){
         return true;
       }
       return false;
     },
  }

Leave a comment