getMaxCounter

fun Property.getMaxCounter(value: String?, control: Control): Pair<Int, Int>?

Return a Pair of Int (current value length to max length), if the property is a TextInputProperty, control options showMaxCounter is true and has a max length specified.

val property = StringProperty()
val control = Control(scope = "#/properties/string")
val counter = property.getMaxLengthCounter(value.length, control)

Return

Pair of Int (current value length to max length)

Parameters

value

Length of the current value, or 0 if value is null