Merge pull request #405 from itsaboutcode/show_field_min_length

Showing length error for Payment, Note and ItemUnit Model Views
This commit is contained in:
Mohit Panjwani
2021-03-22 12:26:41 +05:30
committed by GitHub
3 changed files with 24 additions and 0 deletions

View File

@ -68,6 +68,14 @@ export default {
if (!this.$v.formData.name.required) {
return this.$tc('validation.required')
}
if (!this.$v.formData.name.minLength) {
return this.$tc(
'validation.name_min_length',
this.$v.formData.name.$params.minLength.min,
{ count: this.$v.formData.name.$params.minLength.min }
)
}
},
},
validations: {

View File

@ -105,6 +105,14 @@ export default {
if (!this.$v.formData.name.required) {
return this.$tc('validation.required')
}
if (!this.$v.formData.name.minLength) {
return this.$tc(
'validation.name_min_length',
this.$v.formData.name.$params.minLength.min,
{ count: this.$v.formData.name.$params.minLength.min }
)
}
},
noteError() {
if (!this.$v.formData.notes.$error) {

View File

@ -62,6 +62,14 @@ export default {
if (!this.$v.formData.name.required) {
return this.$tc('validation.required')
}
if (!this.$v.formData.name.minLength) {
return this.$tc(
'validation.name_min_length',
this.$v.formData.name.$params.minLength.min,
{ count: this.$v.formData.name.$params.minLength.min }
)
}
},
},
validations: {