From ad4dfcf74819e888f98cde848a273c1a011a5cdb Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Fri, 15 May 2020 12:20:39 -0400 Subject: [PATCH] further changes to orbservation --- MVMCoreUI/Atomic/Atoms/TextFields/EntryField.swift | 6 ------ MVMCoreUI/Atomic/Atoms/TextFields/TextEntryField.swift | 6 ++++++ MVMCoreUI/Atomic/Atoms/TextFields/TextViewEntryField.swift | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/TextFields/EntryField.swift b/MVMCoreUI/Atomic/Atoms/TextFields/EntryField.swift index 3a5084c6..499fe5a8 100644 --- a/MVMCoreUI/Atomic/Atoms/TextFields/EntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/TextFields/EntryField.swift @@ -250,12 +250,6 @@ import UIKit @objc func endInputing() { isSelected = false resignFirstResponder() - - // Don't show error till user starts typing. - guard text?.count ?? 0 != 0 else { - showError = false - return - } } //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/TextFields/TextEntryField.swift b/MVMCoreUI/Atomic/Atoms/TextFields/TextEntryField.swift index 969fdfd4..63ba9e71 100644 --- a/MVMCoreUI/Atomic/Atoms/TextFields/TextEntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/TextFields/TextEntryField.swift @@ -272,6 +272,12 @@ import UIKit /// Executes on UITextField.textDidEndEditingNotification @objc override func endInputing() { super.endInputing() + + // Don't show error till user starts typing. + guard text?.count ?? 0 != 0 else { + showError = false + return + } if let isValid = textEntryFieldModel?.isValid { self.isValid = isValid diff --git a/MVMCoreUI/Atomic/Atoms/TextFields/TextViewEntryField.swift b/MVMCoreUI/Atomic/Atoms/TextFields/TextViewEntryField.swift index 4331701c..cb8e2cae 100644 --- a/MVMCoreUI/Atomic/Atoms/TextFields/TextViewEntryField.swift +++ b/MVMCoreUI/Atomic/Atoms/TextFields/TextViewEntryField.swift @@ -206,6 +206,12 @@ class TextViewEntryField: EntryField, UITextViewDelegate, ObservingTextFieldDele @objc override func endInputing() { super.endInputing() + // Don't show error till user starts typing. + guard text?.count ?? 0 != 0 else { + showError = false + return + } + if let isValid = textViewEntryFieldModel?.isValid { self.isValid = isValid }