Function
shouldRunAction
(
node: FieldNode,
ignoreValidators?: FormSubmitOptions<unknown, unknown>['ignoreValidators'],
)
Source from the content-addressed store, hash-verified
| 511 | } |
| 512 | |
| 513 | function shouldRunAction( |
| 514 | node: FieldNode, |
| 515 | ignoreValidators?: FormSubmitOptions<unknown, unknown>['ignoreValidators'], |
| 516 | ) { |
| 517 | switch (ignoreValidators) { |
| 518 | case 'all': |
| 519 | return true; |
| 520 | case 'none': |
| 521 | return untracked(node.valid); |
| 522 | default: // Ignore pending validators by default (or specified 'pending'). |
| 523 | return !untracked(node.invalid); |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | /** |
| 528 | * Sets a list of submission errors to their individual fields. |
Tested by
no test coverage detected