MCPcopy Create free account
hub / github.com/formkit/formkit / getMaxLength

Function getMaxLength

packages/addons/src/plugins/inputCount.ts:91–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89 }
90
91 function getMaxLength() {
92 const rules = node.props.parsedRules
93 if (rules && rules.length > 0) {
94 const maxLengthRule = rules.find(
95 (rule: { name: string; args: object[] }) =>
96 rule.name === 'length' && rule.args && rule.args.length > 1
97 )
98 if (maxLengthRule) {
99 return parseInt(maxLengthRule.args[1])
100 }
101 }
102 return null
103 }
104 }
105 })
106 }

Callers 1

createInputCountPluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected