Form Field Tree Select

A pre-composed form field that wraps a Tree Select control with automatic label, helper text, and error message display. Inherits from FormFieldBase for EditContext integration, generated control IDs and ARIA wiring.

Default

The wrapper supplies the trigger id and the aria-describedby target, so the label points at the trigger and the helper text is announced with it. See Tree Select for the tree, search and cascading rules.

Multiple Selection

Multiple switches the control to checkboxes and binds Values instead of Value; the wrapper forwards ValuesExpression so validation still works. LeafOnly keeps only leaf keys in the bound set.

Disabled and Error

ErrorText makes the field invalid and hides the helper text. A disabled field keeps its caption but cannot be opened, and its hidden inputs are not posted.

EditForm Validation

Every change calls EditContext.NotifyFieldChanged, so validation re-runs as the user picks. Required only sets aria-required on the trigger — the model attribute is what fails the submit.