From 4832ecd4192c130d8bd2f5d931167796410ba871 Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Fri, 10 Aug 2018 12:42:06 -0400 Subject: [PATCH] fix mount masking behavior for email fields --- js/components/text_input.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/components/text_input.js b/js/components/text_input.js index d377002c..baa07d83 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -43,8 +43,12 @@ export default { if (this.value) { this._checkIfValid({ value: this.value, invalidate: true }) - if (this.mask) { - this.value = conformToMask(this.value, this.mask).conformedValue + if (this.mask && this.validation !== 'email') { + const mask = typeof this.mask.mask !== 'function' + ? this.mask + : mask.mask(this.value).filter((val) => val !== '[]') + + this.value = conformToMask(this.value, mask).conformedValue } } },