From 87905c07f4b50694bb841a8508d17651e19bd0c3 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Tue, 12 Feb 2019 11:01:27 -0500 Subject: [PATCH] Add validation for textInput on blur --- js/components/text_input.js | 4 ++++ templates/components/text_input.html | 1 + 2 files changed, 5 insertions(+) diff --git a/js/components/text_input.js b/js/components/text_input.js index 002884a2..506274a6 100644 --- a/js/components/text_input.js +++ b/js/components/text_input.js @@ -84,6 +84,10 @@ export default { } }, + onBlur: function(e) { + this._checkIfValid({ value: e.target.value, invalidate: true }) + }, + // _checkIfValid: function({ value, invalidate = false }) { // Validate the value diff --git a/templates/components/text_input.html b/templates/components/text_input.html index 97797983..553f4574 100644 --- a/templates/components/text_input.html +++ b/templates/components/text_input.html @@ -64,6 +64,7 @@