Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
email: {
required,
email
},
password: {
required,
minLength: minLength(4),
maxLength: maxLength(20)
},
confirmPassword: {
required,
minLength: minLength(4),
maxLength: maxLength(20),
sameAsPassword: sameAs("password")
}
}
},
computed: {
...mapGetters({
error: "vuefront/error"
})
},
methods: {
async onSubmit() {
this.$v.$touch();
if (!this.$v.form.$invalid) {
await this.$store.dispatch("common/customer/register", {
},
mixins: [validationMixin],
validations: {
rating: {
required,
minValue: minValue(1),
maxValue: maxValue(5),
},
author: {
required,
minLength: minLength(1),
maxLength: maxLength(32),
},
review: {
required,
minLength: minLength(25),
maxLength: maxLength(1000),
},
},
methods: {
handleSend() {
this.$v.$touch()
if (!this.$v.$invalid) {
this.$emit('create', {
content: this.review,
author: this.author,
rating: this.rating,
})
this.author = ''
this.rating = 0
this.review = ''
},
mixins: [validationMixin],
validations: {
rating: {
required,
minValue: minValue(1),
maxValue: maxValue(5)
},
author: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
review: {
required,
minLength: minLength(25),
maxLength: maxLength(1000)
}
},
methods: {
onSubmit(e) {
this.$v.$touch();
if (!this.$v.$invalid) {
this.$emit("submit", {
content: this.review,
author: this.author,
rating: this.rating
});
this.author = "";
this.rating = 0;
this.review = "";
...fields,
zoneId: {
required
}
};
}
return {
form: {
firstName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
lastName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
company: {
minLength: minLength(1),
maxLength: maxLength(32)
},
address1: {
required,
minLength: minLength(3),
maxLength: maxLength(128)
},
address2: {
minLength: minLength(3),
maxLength: maxLength(128)
},
city: {
}
return {
form: {
firstName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
lastName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
company: {
minLength: minLength(1),
maxLength: maxLength(32)
},
address1: {
required,
minLength: minLength(3),
maxLength: maxLength(128)
},
address2: {
minLength: minLength(3),
maxLength: maxLength(128)
},
city: {
required,
minLength: minLength(2),
maxLength: maxLength(128)
},
lastName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
company: {
minLength: minLength(1),
maxLength: maxLength(32)
},
address1: {
required,
minLength: minLength(3),
maxLength: maxLength(128)
},
address2: {
minLength: minLength(3),
maxLength: maxLength(128)
},
city: {
required,
minLength: minLength(2),
maxLength: maxLength(128)
},
zipcode: {
required,
minLength: minLength(2),
maxLength: maxLength(10)
},
countryId: {
required
},
...fields
data() {
const customer_info = this.$store.getters["common/customer/get"];
return {
form: {
firstName: customer_info.firstName,
lastName: customer_info.lastName,
email: customer_info.email
}
};
},
mixins: [validationMixin],
validations: {
form: {
firstName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
lastName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
email: {
required,
email
}
}
},
computed: {
...mapGetters({
error: "vuefront/error"
...fields,
zoneId: {
required
}
};
}
return {
form: {
firstName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
lastName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
company: {
minLength: minLength(1),
maxLength: maxLength(32)
},
address1: {
required,
minLength: minLength(3),
maxLength: maxLength(128)
},
address2: {
minLength: minLength(3),
maxLength: maxLength(128)
},
city: {
company: {
minLength: minLength(1),
maxLength: maxLength(32)
},
address1: {
required,
minLength: minLength(3),
maxLength: maxLength(128)
},
address2: {
minLength: minLength(3),
maxLength: maxLength(128)
},
city: {
required,
minLength: minLength(2),
maxLength: maxLength(128)
},
zipcode: {
required,
minLength: minLength(2),
maxLength: maxLength(10)
},
countryId: {
required
},
...fields
}
};
},
methods: {
},
address2: {
minLength: minLength(3),
maxLength: maxLength(128)
},
city: {
required,
minLength: minLength(2),
maxLength: maxLength(128)
},
countryId: {
required
},
zipcode: {
required,
minLength: minLength(2),
maxLength: maxLength(10)
},
...fields
}
};
},
computed: {