MCPcopy Create free account
hub / github.com/cryptii/cryptii / setMaxLength

Method setMaxLength

src/Field/Text.js:82–88  ·  view source on GitHub ↗

* Sets max text length. * @param {?number} maxLength Max text length * @param {boolean} [revalidate=true] Wether to revalidate current value * @return {TextField} Fluent interface

(maxLength, revalidate = true)

Source from the content-addressed store, hash-verified

80 * @return {TextField} Fluent interface
81 */
82 setMaxLength (maxLength, revalidate = true) {
83 if (this._maxLength === maxLength) {
84 return this
85 }
86 this._maxLength = maxLength !== null ? parseInt(maxLength) : null
87 return revalidate ? this.revalidateValue() : this
88 }
89
90 /**
91 * Returns the whitelisted Unicode code points.

Callers 2

constructorMethod · 0.95
settingValueDidChangeMethod · 0.80

Calls 1

revalidateValueMethod · 0.80

Tested by

no test coverage detected