mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
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:
8
resources/assets/js/components/base/modal/ItemUnitModal.vue
Normal file → Executable file
8
resources/assets/js/components/base/modal/ItemUnitModal.vue
Normal file → Executable 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: {
|
||||
|
||||
8
resources/assets/js/components/base/modal/NoteModal.vue
Normal file → Executable file
8
resources/assets/js/components/base/modal/NoteModal.vue
Normal file → Executable 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) {
|
||||
|
||||
8
resources/assets/js/components/base/modal/PaymentModeModal.vue
Normal file → Executable file
8
resources/assets/js/components/base/modal/PaymentModeModal.vue
Normal file → Executable 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: {
|
||||
|
||||
Reference in New Issue
Block a user