Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
insert check function inside submit function to check if there missing inputs before send data to the backend server in Vue JS

I want to add function to prevent submit button from submit data to server if there are empty inputs. I wrote a checkform function to check if all inputs not empty but i do not how can i insert this function inside createReport function

checkForm: function (e) {
     if (this.tops && this.bottoms && this.build && this.wallNumber &&this.authors ) {
       return true;
     } else {
return false
}
};

My HTML

<v-btn  width="100%" class="primary" :loading="isbuildGenerating" @submit="createReport(true)">Generate</v-btn>

java script


         createReport: function (isCraft=true) {
          this.$refs.form.validate()
          this.$emit('buildGenerated', null)
          this.isbuildGenerated = true
          this.isbuildGenerated = false    
          let jsonData = {
            build:this.build, 
            wallNumber:this.wallNumber,
            time:this.time,
            bottoms:this.bottoms
            tops:this.tops
            authors:this.authors
 }
            this.$axios.post(this.$backendUrl + '/buildoperations', jsonData)
            .then(response => {
            this.pdfData = { data: response.data }
            this.$emit('pdfGenerated', this.pdfData)
            this.isbuildGenerated = true
            this.isbuildGenerating = false
          })
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!