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