verify field only once

This commit is contained in:
Pete Matsyburka
2024-04-20 17:07:31 +03:00
parent e7eb1d4f12
commit e9c1242b8d
2 changed files with 25 additions and 1 deletions
@@ -108,6 +108,11 @@ export default {
type: Object,
required: true
},
verifiedValue: {
type: String,
required: false,
default: ''
},
submitterSlug: {
type: String,
required: true
@@ -164,6 +169,10 @@ export default {
})
},
async submit () {
if (this.verifiedValue && this.verifiedValue === this.modelValue) {
return Promise.resolve({})
}
if (!this.$refs.phone.value.toString().startsWith('+')) {
alert(this.t('use_international_format'))