MCPcopy Index your code
hub / github.com/angular/angular / shouldRunAction

Function shouldRunAction

packages/forms/signals/src/api/structure.ts:491–503  ·  view source on GitHub ↗
(
  node: FieldNode,
  ignoreValidators?: FormSubmitOptions<unknown, unknown>['ignoreValidators'],
)

Source from the content-addressed store, hash-verified

489}
490
491function shouldRunAction(
492 node: FieldNode,
493 ignoreValidators?: FormSubmitOptions<unknown, unknown>['ignoreValidators'],
494) {
495 switch (ignoreValidators) {
496 case 'all':
497 return true;
498 case 'none':
499 return untracked(node.valid);
500 default: // Ignore pending validators by default (or specified 'pending').
501 return !untracked(node.invalid);
502 }
503}
504
505/**
506 * Sets a list of submission errors to their individual fields.

Callers 1

submitFunction · 0.85

Calls 1

untrackedFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…