---
title: Aggregate page validity
summary: Determines whether the entire page is valid and collects all deduplicated error messages.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.AJAX.Infragistics111
reference_type: package
operation_id: OP-AJAX-05
trigger: Page code-behind reads BindingManager.IsValid or ErrorMessages
---

# Aggregate page validity

This operation walks every auto-binding control on the page to determine overall page validity and to build a single deduplicated error message string.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-AJAX-05 |
| **Trigger** | Page code-behind reads `BindingManager.IsValid` or `ErrorMessages` |
| **Inputs** | `Page.Controls` tree |
| **Outputs** | Boolean page validity; aggregated error text |
| **Primary components** | `BindingManager.CheckValidControls`, `AppendUniqueMessages` |
| **Entry point** | `SAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingManager.vb` |

## Steps

1. Walk `Page.Controls` recursively.
2. For each leaf control that is (or whose `BindingContainer` is) an `iAutoBindingControl`, read its `IsValid`; return `False` on the first invalid control. ([BR-AJAX-013](../business-rules.md#br-ajax-013-the-page-is-valid-only-when-every-auto-binding-control-is-valid))
3. `ErrorMessages` performs the same walk, appending each control's messages to a `StringBuilder`, suppressing any message whose text already appears, each followed by `<br>`; the trailing separator character is then trimmed. ([BR-AJAX-010](../business-rules.md#br-ajax-010-duplicate-validation-messages-are-shown-only-once))

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Read IsValid / ErrorMessages]) --> Walk[Walk Page.Controls recursively]
	Walk --> Leaf{Leaf is iAutoBindingControl<br>or container is one?}
	Leaf -->|No| Walk
	Leaf -->|Yes| ReadValid[Read control IsValid]
	ReadValid --> Invalid{Invalid?}
	Invalid -->|Yes| EndInvalid([Page invalid])
	Invalid -->|No| Walk
	Walk --> AllChecked{All controls checked?}
	AllChecked -->|Yes| EndValid([Page valid, messages aggregated])
```

## Failure and edge-case behavior
- The first invalid control short-circuits `IsValid` to `False`; `ErrorMessages` always walks every control to build the complete aggregated text regardless of the `IsValid` short-circuit.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingManager.vb`
