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 {
|
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 {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user