diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 432d24bd..8e5f8e58 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -251,7 +251,7 @@ open class TextArea: EntryFieldBase { return countStr } else { showError = false - errorText = "" + errorText = nil return ("\(countStr)" + "/" + "\(maxLength ?? 0)") } } else { @@ -261,7 +261,7 @@ open class TextArea: EntryFieldBase { open func highlightCharacterOverflow() { let count = textView.text.count - guard let maxLength, count > maxLength else { + guard let maxLength, maxLength > 0, count > maxLength else { textView.textAttributes = nil return } @@ -315,6 +315,7 @@ extension TextArea: UITextViewDelegate { sendActions(for: .valueChanged) } } + } /// Will move this into a new file, need to talk with Scott/Kyle