DotVVM Tip 06: Validation controls


DotVVM 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.

Tomáš Herceg
Tomáš Herceg


I am the CEO of RIGANTI, small software development company located in Prague, Czech Republic.

I am a Microsoft Regional Director and Microsoft Most Valuable Professional.

I am the author of DotVVM, an open source .NET-based web framework which lets you build Line-of-Business applications easily and without writing thousands lines of Javascript code.

Ostatní články z kategorie: DotVVM Blog