Archaana
4 months ago
518
2
Vue

Using Watch to remove the text-danger while typing the input

Posted 4 months ago by Archaana

Hey, I want to remove the text-danger when the input is being filled/validate using watch from vue ... can anyone help me to do that part.

 watch:{
            

        },
        methods: {
            validate: function() {
                let valid = true;

                if (!this.job.jobName) {
                    this.$set(this.error, 'jobName', 'Job name is required');
                    valid = false;
                }

                if (!this.job.jobDescription) {
                    this.$set(this.error, 'jobDescription', 'Job description is required');
                    valid = false;
                }

                 if (!this.job.workingHour) {
                    this.$set(this.error, 'workingHour', 'Working Hour is required');
                    valid = false;
                }

                if (!this.job.salary) {
                    this.$set(this.error, 'salary', 'Salary is required');
                    valid = false;
                }

                if (!this.job.jobBenefit) {
                    this.$set(this.error, 'jobBenefit', 'Job Benefit is required');
                    valid = false;
                }

                return valid;
            },

my watch is empty to far

Please sign in or create an account to participate in this conversation.