fix the validation

This commit is contained in:
hastichavda
2019-11-12 11:00:35 +05:30
parent 80a761dbe0
commit 03d18065c6
10 changed files with 134 additions and 33 deletions

View File

@ -35,6 +35,8 @@
<div v-if="$v.formData.price.$error">
<span v-if="!$v.formData.price.required" class="text-danger">{{ $tc('validation.required') }}</span>
<span v-if="!$v.formData.price.numeric" class="text-danger">{{ $tc('validation.numbers_only') }}</span>
<span v-if="!$v.formData.price.maxLength" class="text-danger">{{ $t('validation.price_maxlength') }}</span>
<span v-if="!$v.formData.price.minValue" class="text-danger">{{ $t('validation.price_minValue') }}</span>
</div>
</div>
</div>
@ -138,7 +140,8 @@ export default {
price: {
required,
numeric,
minValue: minValue(0.1)
minValue: minValue(0.1),
maxLength: maxLength(10)
},
description: {
maxLength: maxLength(255)

View File

@ -189,7 +189,7 @@ export default {
response = await this.updateTaxType(this.formData)
}
if (response.data) {
window.toastr['success'](this.$t('settings.sales_taxes.created_message'))
window.toastr['success'](this.$t('settings.tax_types.created_message'))
window.hub.$emit('newTax', response.data.taxType)
this.closeTaxModal()
this.isLoading = false