diff --git a/js/components/text_input.js b/js/components/text_input.js index 883e0a75..7663b957 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -95,7 +95,7 @@ export default { } else if (invalidate) { this.showError = true } - this.showValid = valid + this.showValid = this.value != "" && valid // Emit a change event this.$root.$emit('field-change', { diff --git a/js/lib/input_validations.js b/js/lib/input_validations.js index c14b958d..13134644 100644 --- a/js/lib/input_validations.js +++ b/js/lib/input_validations.js @@ -5,7 +5,7 @@ import createAutoCorrectedDatePipe from 'text-mask-addons/dist/createAutoCorrect export default { anything: { mask: false, - match: /^(?!\s*$).+/, + match: /\s*/, unmask: [], validationError: 'Please enter a response' },