dynamically add rules

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-07-12 14:36:37 -05:00
parent 95f4ad06a1
commit 4ca74fa445

View File

@ -111,6 +111,8 @@ open class TextArea: EntryFieldBase {
} }
didSet { didSet {
setNeedsUpdate()
if textView.isFirstResponder { if textView.isFirstResponder {
validate() validate()
} }
@ -191,8 +193,9 @@ open class TextArea: EntryFieldBase {
override func updateRules() { override func updateRules() {
super.updateRules() super.updateRules()
if let maxLength, maxLength > 0 {
rules.append(.init(countRule)) rules.append(.init(countRule))
}
} }
open override func getFieldContainer() -> UIView { open override func getFieldContainer() -> UIView {