@angular/forms 21.1.1 → 21.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.1.1
2
+ * @license Angular v21.1.2
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1557,8 +1557,11 @@ function applyWhenValue(path, predicate, schema) {
1557
1557
  }
1558
1558
  async function submit(form, action) {
1559
1559
  const node = form();
1560
- markAllAsTouched(node);
1561
- if (node.invalid()) {
1560
+ const invalid = untracked(() => {
1561
+ markAllAsTouched(node);
1562
+ return node.invalid();
1563
+ });
1564
+ if (invalid) {
1562
1565
  return;
1563
1566
  }
1564
1567
  node.submitState.selfSubmitting.set(true);
@@ -1592,6 +1595,9 @@ function schema(fn) {
1592
1595
  return SchemaImpl.create(fn);
1593
1596
  }
1594
1597
  function markAllAsTouched(node) {
1598
+ if (node.validationState.shouldSkipValidation()) {
1599
+ return;
1600
+ }
1595
1601
  node.markAsTouched();
1596
1602
  for (const child of node.structure.children()) {
1597
1603
  markAllAsTouched(child);