()
| 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 | } |
no outgoing calls
no test coverage detected