DotVVM Tip 06: Validation controls
Published: 11/21/2022 1:15:00 PMDotVVM Tips is a series of short articles showing interesting features of DotVVM. To learn more, visit our Docs site.
DotVVM syntax is different from Razor. The Validator control can display validation errors for a particular property. You can choose to apply CSS classes on any element based on validation state of some property.
// Razor
<InputText @bind-Value="Address.PostalCode" />
<ValidationMessage For="@(() => Address.PostalCode)" />
// DotVVM
<dot:TextBox Text="{value: PostalCode}" />
<dot:Validator Value="{value: PostalCode}" />
The validation framework in DotVVM is very powerful. Read more in the Validation overview page.
I am the CEO of RIGANTI, a small software development company located in Prague, Czech Republic.
I am Microsoft Most Valuable Professional and the founder of DotVVM project.