Skip to content

Commit 13fa3bd

Browse files
authored
Merge pull request #122 from ditdot-dev/url-mask
Remove mask option from url field
2 parents c9feebc + f9d7b10 commit 13fa3bd

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@
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+
66+
return !this.question.required || this.hasValue
67+
}
5968
}
6069
}
6170
</script>

src/models/QuestionModel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ export default class QuestionModel {
9696
this.placeholder = this.mask
9797
}
9898
}
99+
100+
if (this.type === QuestionType.Url) {
101+
this.mask = null
102+
}
103+
99104
if (this.multiple) {
100105
this.answer = []
101106
}

0 commit comments

Comments
 (0)