Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
confirmPassword: null
}
};
},
mixins: [validationMixin],
validations: {
form: {
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/editPassword", {
password: this.form.password
author: "",
rating: 0,
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
mixins: [validationMixin],
validations: {
form: {
name: {
required,
minLength: minLength(3),
maxLength: maxLength(32)
},
email: {
required,
email
},
message: {
required,
minLength: minLength(10),
maxLength: maxLength(3000)
}
}
},
methods: {
async onSubmit(e) {
this.$v.$touch();
if (!this.$v.form.$invalid) {
await this.$store.dispatch("common/contact/send", this.form);
if (!this.error) {
this.$store.commit(
"notification/add",
this.$t("elements.common.contact.successText")
);
e.preventDefault();
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", {
firstName: this.form.firstName,
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)
},
countryId: {
required
},
zipcode: {
required,
minLength: minLength(2),
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: {
required,
confirmPassword: null
}
};
},
mixins: [validationMixin],
validations: {
form: {
firstName: {
required,
minLength: minLength(1),
maxLength: maxLength(32)
},
lastName: {
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")
}
let fields = {};
if (!isEmpty(this.zones) && this.zones.content.length > 0) {
fields = {
...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)
},
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
}
};
},
computed: {
if (this.zones.content.length > 0) {
fields = {
...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: {