* A string of validation rules written in FormKitRule notation. * @param validation - The string of rules * @internal
(validation: string)
| 629 | * @internal |
| 630 | */ |
| 631 | function extractRules(validation: string): FormKitValidationIntent[] { |
| 632 | return validation.split('|').reduce((rules, rule) => { |
| 633 | const parsedRule = parseRule(rule) |
| 634 | if (parsedRule) { |
| 635 | rules.push(parsedRule) |
| 636 | } |
| 637 | return rules |
| 638 | }, [] as FormKitValidationIntent[]) |
| 639 | } |
| 640 | |
| 641 | /** |
| 642 | * Given a rule like confirm:password_confirm produce a FormKitValidationIntent |
no test coverage detected