Blazor Dropdown Tree Example - Form Validation
This sample demonstrates how to use the Dropdown Tree component inside an EditForm
and validate using Data Annotations
. Click Submit to validate the form.
In this demo, EditForm
validates all data annotation rules using DataAnnotationsValidator
.
Choose the value from the dropdown pop-up, and if the value is valid, then the given input will be ready to submit.
Otherwise, an error message will be shown until you choose a valid value.
In this demo, the field mapped to the Dropdown Tree component value is configured with the following rule.
Field | Rule |
---|---|
Skills | The field must have a valid value and a minimum of two values. |
Role | The field must have a valid value. |