dynamically add rules
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
95f4ad06a1
commit
4ca74fa445
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user