Skip to content

Commit f53bd93

Browse files
committed
Remove mask from url field
1 parent 5652b45 commit f53bd93

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/components/QuestionTypes/BaseType.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@
137137
return true
138138
}
139139
140-
if (this.question.mask && this.dataValue.length !== this.question.mask.length) {
141-
return false
142-
}
143-
144140
if (this.validate()) {
145141
return true
146142
}

src/components/QuestionTypes/TextType.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@
5656
inputType: 'text',
5757
canReceiveFocus: true
5858
}
59+
},
60+
methods: {
61+
validate(){
62+
if (this.question.mask && this.dataValue.length !== this.question.mask.length) {
63+
return false
64+
}
65+
return !this.question.required || this.hasValue
66+
}
5967
}
6068
}
6169
</script>

src/components/QuestionTypes/UrlType.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
},
2929
3030
validate() {
31+
if (this.question.mask) {
32+
this.question.mask = ''
33+
}
34+
3135
if (this.hasValue) {
3236
try {
3337
var url = new URL(this.fixAnswer(this.dataValue))

0 commit comments

Comments
 (0)