From 444d2568483ebb2b1c3e054972996f94dc2f4de8 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Thu, 29 Aug 2019 12:50:53 -0400 Subject: [PATCH] Check if field is valid on blur if it is modified and not optional --- js/components/text_input.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/components/text_input.js b/js/components/text_input.js index 962fcabf..92c8c7e4 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -102,6 +102,8 @@ export default { onBlur: function(e) { if (!(this.optional && e.target.value === '')) { this._checkIfValid({ value: e.target.value.trim(), invalidate: true }) + } else if (this.modified && !this.optional) { + this._checkIfValid({ value: e.target.value.trim(), invalidate: true }) } this.value = e.target.value.trim()