diff --git a/src/components/pages/CallForward/CscAddDestinationForm.vue b/src/components/pages/CallForward/CscAddDestinationForm.vue index 09f731a6..c76706f4 100644 --- a/src/components/pages/CallForward/CscAddDestinationForm.vue +++ b/src/components/pages/CallForward/CscAddDestinationForm.vue @@ -53,7 +53,6 @@ dark :before="beforeIconTimeout" :float-label="$t('pages.callForward.timeout')" - type="number" v-model="destinationForm.timeout" suffix="seconds" clearable @@ -96,7 +95,8 @@ import { required, maxLength, - minValue + minValue, + numeric } from 'vuelidate/lib/validators' import { QItem, @@ -148,7 +148,8 @@ }, timeout: { required, - minValue: minValue(1) + minValue: minValue(1), + numeric } } }, @@ -176,15 +177,20 @@ } }, timeoutInputError() { - if (!this.$v.destinationForm.timeout.minValue) { - return this.$t('validationErrors.minValueSecond', { + if (!this.$v.destinationForm.timeout.required) { + return this.$t('validationErrors.fieldRequired', { + field: this.$t('pages.callForward.timeout') + }); + } + else if (!this.$v.destinationForm.timeout.numeric) { + return this.$t('validationErrors.numeric', { field: this.$t('pages.callForward.timeout'), - minValue: this.$v.destinationForm.timeout.$params.minValue.min }); } - else if (!this.$v.destinationForm.timeout.required) { - return this.$t('validationErrors.fieldRequired', { - field: this.$t('pages.callForward.timeout') + else if (!this.$v.destinationForm.timeout.minValue) { + return this.$t('validationErrors.minValueSecond', { + field: this.$t('pages.callForward.timeout'), + minValue: this.$v.destinationForm.timeout.$params.minValue.min }); } }, diff --git a/src/components/pages/CallForward/CscDestinations.vue b/src/components/pages/CallForward/CscDestinations.vue index 58b6188d..9a3142ed 100644 --- a/src/components/pages/CallForward/CscDestinations.vue +++ b/src/components/pages/CallForward/CscDestinations.vue @@ -168,7 +168,6 @@ dark v-if="ownPhone" v-model="editTimeout" - type="number" suffix="seconds" :before="[{ icon: 'schedule' }]" :float-label="$t('pages.callForward.timeout')" @@ -216,7 +215,8 @@ import CscAddDestinationForm from './CscAddDestinationForm' import { required, - minValue + minValue, + numeric } from 'vuelidate/lib/validators' import { QList, @@ -273,7 +273,8 @@ validations: { editTimeout: { required, - minValue: minValue(1) + minValue: minValue(1), + numeric } }, computed: { @@ -281,17 +282,22 @@ return this.ownPhone ? 'fa-toggle-off' : 'fa-toggle-on'; }, errorMessage() { - if (!this.$v.editTimeout.minValue) { - return this.$t('validationErrors.minValueSecond', { - field: this.$t('pages.callForward.timeout'), - minValue: this.$v.editTimeout.$params.minValue.min - }); - } - else if (!this.$v.editTimeout.required) { + if (!this.$v.editTimeout.required) { return this.$t('validationErrors.fieldRequired', { field: this.$t('pages.callForward.timeout') }); } + else if (!this.$v.editTimeout.numeric) { + return this.$t('validationErrors.numeric', { + field: this.$t('pages.callForward.timeout'), + }); + } + else if (!this.$v.editTimeout.minValue) { + return this.$t('validationErrors.minValueSecond', { + field: this.$t('pages.callForward.timeout'), + minValue: this.$v.editTimeout.$params.minValue.min + }); + } }, editTimeout: { get() { diff --git a/src/components/pages/PbxConfiguration/CscPbxDevice.vue b/src/components/pages/PbxConfiguration/CscPbxDevice.vue index cb793112..a496cbb6 100644 --- a/src/components/pages/PbxConfiguration/CscPbxDevice.vue +++ b/src/components/pages/PbxConfiguration/CscPbxDevice.vue @@ -48,12 +48,12 @@ > - - + + diff --git a/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue b/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue index 4af561b6..36a3cbea 100644 --- a/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue +++ b/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue @@ -167,7 +167,7 @@ }); } else if (!this.$v.data.extension.numeric) { - return this.$t('validationErrors.alphaNum', { + return this.$t('validationErrors.numeric', { field: this.$t('pbxConfig.extension'), }); } diff --git a/src/components/pages/Voicebox/CscVoiceboxSettings.vue b/src/components/pages/Voicebox/CscVoiceboxSettings.vue index 82fec014..e82bc8bb 100644 --- a/src/components/pages/Voicebox/CscVoiceboxSettings.vue +++ b/src/components/pages/Voicebox/CscVoiceboxSettings.vue @@ -85,8 +85,10 @@